Translation
(9) The Chapters on Marriage
كتاب النكاح
(59) Chapter: The child is for the bed and the fornicator gets nothing
(59) باب الْوَلَدِ لِلْفِرَاشِ وَلِلْعَاهِرِ الْحَجَرُ
Sunan Ibn Majah 2005 
It was narrated from 'Umar that:
the Messenger of Allah ruled that the child belonged to the bed.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا سُفْيَانُ بْنُ عُيَيْنَةَ، عَنْ عُبَيْدِ اللَّهِ بْنِ أَبِي يَزِيدَ، عَنْ أَبِيهِ، عَنْ عُمَرَ، أَنَّ رَسُولَ اللَّهِ ـ صلى الله عليه وسلم ـ قَضَى بِالْوَلَدِ لِلْفِرَاشِ ‏.‏
Grade :  Sahih (Darussalam)
Reference : Sunan Ibn Majah 2005
In-book reference : Book 9, Hadith 161
English translation : Vol. 3, Book 9, Hadith 2005