Allah's Messenger (ﷺ) ordered that an unmarried man who committed illegal sexual intercourse be scourged one hundred lashes and sent into exile for one year.
Sahih al-Bukhari Book 52, Hadith 13