On forbidding a woman to travel on her own

Riyad as-Salihin (The Meadows of the Righteous)

by Imam Nawawi

179. Chapter: On forbidding a woman to travel on her own

989. Abu Hurayra reported that the Messenger of Allah, may Allah bless him and grant him peace, said, "It is not lawful for a woman who believes in Allah and the Last Day to travel the distance of a day and a night without having a dhu mahram with her." [Agreed upon]

990. Ibn 'Abbas reported that he heard the Prophet, may Allah bless him and grant him peace, said, "A man should not be on his own with a woman unless there is a dhu mahram with her. A woman should only travel with a dhu mahram." A man said to him, "Messenger of Allah, what if my wife goes out on hajj when I have been appointed to go on such-and-such an expedition?" He said, "Go and do hajj with your wife." [Agreed upon]

[A dhu mahram is a close male relative with whom marriage is forbidden.]