The Messenger of Allah ﷺ ruled that whoever commits adultery while unmarried is to be banished for one year, in addition to having the prescribed punishment carried out on him.
حدثنا يحيى بن بكير حدثنا الليث عن عقيل عن ابن شهاب عن سعيد بن المسيب
أن رسول الله ﷺ قضى فيمن زنى ولم يحصن بنفي عام بإقامة الحد عليه