Sunan Ibn Majah #2006 · The Chapters on Marriage

Sunan Ibn MajahIt was narrated from Abu Hurairah that
Sunan Ibn Majah · Book 9 · The Chapters on Marriage
Sunan Ibn Majah · كتاب 9 · كتاب النكاح
the Prophet said: "The child is for the bed (i.e., belongs to the husband) and the fornicator gets nothing
حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنِ الزُّهْرِيِّ، عَنْ سَعِيدِ بْنِ الْمُسَيَّبِ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ قَالَ ‏
"‏ الْوَلَدُ لِلْفِرَاشِ ‏.‏ وَلِلْعَاهِرِ الْحَجَرُ ‏"‏ ‏.‏
Reference : Sunan Ibn Majah 2006In-book reference : Book 9, Hadith 162