Sahih Muslim , Book 7, Hadith 3099 (USC-MSA) ⓘ
Qaza'ah reported: I heard a hadith from Abu Sa'id (Allah be pleased with him) and it impressed me (very much), so I said to him: Did you hear it (yourself) from Allah's Messenger? Thereupon he said: (Can) I speak of anything about Allah's Messenger which I did not bear? He said: I heard Allah's Messenger saying: Do not set out on a journey (for religious devotion) but for the three mosques-for this mosque of mine (at Medina) the Sacred Mosque (at Mecca), and the Mosque al-Aqsa (Bait al-Maqdis), and I heard him saying also: A woman should not travel for two days duration, but only when there is a Mahram with her or her husband.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، وَعُثْمَانُ بْنُ أَبِي شَيْبَةَ، جَمِيعًا عَنْ جَرِيرٍ، - قَالَ قُتَيْبَةُ حَدَّثَنَا جَرِيرٌ، عَنْ عَبْدِ الْمَلِكِ، - وَهُوَ ابْنُ عُمَيْرٍ - عَنْ قَزَعَةَ، عَنْ أَبِي سَعِيدٍ، قَالَ سَمِعْتُ مِنْهُ، حَدِيثًا فَأَعْجَبَنِي فَقُلْتُ لَهُ أَنْتَ سَمِعْتَ هَذَا، مِنْ رَسُولِ اللَّهِ صلى الله عليه وسلم قَالَ فَأَقُولُ عَلَى رَسُولِ اللَّهِ صلى الله عليه وسلم مَا لَمْ أَسْمَعْ قَالَ سَمِعْتُهُ يَقُولُ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ تَشُدُّوا الرِّحَالَ إِلاَّ إِلَى ثَلاَثَةِ مَسَاجِدَ مَسْجِدِي هَذَا وَالْمَسْجِدِ الْحَرَامِ وَالْمَسْجِدِ الأَقْصَى " . وَسَمِعْتُهُ يَقُولُ " لاَ تُسَافِرِ الْمَرْأَةُ يَوْمَيْنِ مِنَ الدَّهْرِ إِلاَّ وَمَعَهَا ذُو مَحْرَمٍ مِنْهَا أَوْ زَوْجُهَا " .
also referenced under: Book 15, Hadith 465 (In-Book) & Hadith 827 (Reference)