Messenger of Allah ﷺ judged that the unmarried person who was guilty of illegal sexual intercourse be exiled for one year and receive the legal punishment (i.e., be flogged with one-hundred stripes) . (Using translation from Bukhārī 6833)
أَنَّ رَسُولَ اللهِ ﷺ «قَضَى فِيمَنْ زَنَا وَلَمْ يُحْصَنْ أَنْ يُنْفَى عَامًا مَعَ إِقَامَةِ الْحَدِّ عَلَيْهِ»