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:15329Abū Zakariyyā b. Abū Isḥāq al-Muzakkī And ʾAbū Bakr Aḥmad b. al-Ḥasan al-Qāḍī > Abū al-ʿAbbās Muḥammad b. Yaʿqūb > al-Rabīʿ b. Sulaymān > al-Shāfiʿī > Sufyān > Ibn Shihāb > Saʿīd b. al-Musayyib or Abū Salamah > Abū Hurayrah al-Shak from Sufyān

[Machine] "That the Messenger of Allah ﷺ said: 'The child belongs to the bed and the adulterer gets the stone.'"  

البيهقي:١٥٣٢٩أَخْبَرَنَا أَبُو زَكَرِيَّا بْنُ أَبِي إِسْحَاقَ الْمُزَكِّي وَأَبُو بَكْرٍ أَحْمَدُ بْنُ الْحَسَنِ الْقَاضِي قَالَا نا أَبُو الْعَبَّاسِ مُحَمَّدُ بْنُ يَعْقُوبَ أنا الرَّبِيعُ بْنُ سُلَيْمَانَ أنا الشَّافِعِيُّ أنا سُفْيَانُ عَنِ ابْنِ شِهَابٍ عَنْ سَعِيدِ بْنِ الْمُسَيِّبِ أَوْ أَبِي سَلَمَةَ عَنْ أَبِي هُرَيْرَةَ ؓ الشَّكُّ مِنْ سُفْيَانَ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ  

رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ عَبْدِ الْأَعْلَى بْنِ حَمَّادٍ عَنْ سُفْيَانَ

See similar narrations below:

Collected by Bayhaqī
bayhaqi:15369Abū ʿAbdullāh al-Ḥāfiẓ > Abū ʿAbdullāh Muḥammad b. Yaʿqūb > Yaḥyá b. Muḥammad b. Yaḥyá > Saʿīd b. Manṣūr > Sufyān > al-Zuhrī > Saʿīd > Abū Hurayrah ؓ

[Machine] That the Messenger of Allah ﷺ said, "Offspring belongs to the bed (where they are born), and stones (to be thrown) belong to the adulterer."  

البيهقي:١٥٣٦٩أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ نا أَبُو عَبْدِ اللهِ مُحَمَّدُ بْنُ يَعْقُوبَ نا يَحْيَى بْنُ مُحَمَّدِ بْنِ يَحْيَى نا سَعِيدُ بْنُ مَنْصُورٍ نا سُفْيَانُ عَنِ الزُّهْرِيِّ عَنْ سَعِيدٍ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّ رَسُولَ اللهِ ﷺ قَالَ الْوَلَدُ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ  

رَوَاهُ مُسْلِمٌ فِي الصَّحِيحِ عَنْ سَعِيدِ بْنِ مَنْصُورٍ