Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:5506Abū ʿAbdullāh al-Ḥāfiẓ And ʾAbū ʿAbdullāh Isḥāq b. Abū Saʿīd al-Sūsī > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-ʿAbbās b. al-Walīd b. Mazyad from my father > al-Awzāʿī > Usāmah b. Zayd al-Laythī > Ḥasan b. Muslim > Ṭāwus al-Yamānī > ʿAbdullāh b. ʿAbbās

[Machine] The Messenger of Allah ﷺ would perform two units of prayer for a journey and four units of prayer for residents. Just as the prayer before and after the prayer of residents is preferable, so too is the prayer for a journey before and after it.  

البيهقي:٥٥٠٦وَأَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ وَأَبُو عَبْدِ اللهِ إِسْحَاقُ بْنُ أَبِي سَعِيدٍ السُّوسِيُّ قَالَا ثنا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنبأ الْعَبَّاسُ بْنُ الْوَلِيدِ بْنِ مَزْيَدَ أَخْبَرَنِي أَبِي ثنا الْأَوْزَاعِيُّ حَدَّثَنِي أُسَامَةُ بْنُ زَيْدٍ اللَّيْثِيُّ حَدَّثَنِي حَسَنُ بْنُ مُسْلِمٍ حَدَّثَنِي طَاوُسٌ الْيَمَانِيُّ حَدَّثَنِي عَبْدُ اللهِ بْنُ عَبَّاسٍ قَالَ

سَنَّ رَسُولُ اللهِ ﷺ يَعْنِي صَلَاةَ السَّفَرِ رَكْعَتَيْنِ وَسَنَّ صَلَاةَ الْحَضَرِ أَرْبَعَ رَكَعَاتٍ فَكَمَا الصَّلَاةُ قَبْلَ صَلَاةِ الْحَضَرِ وَبَعْدَهَا حَسَنٌ فَكَذَلِكَ الصَّلَاةُ فِي السَّفَرِ قَبْلَهَا وَبَعْدَهَا