The child is to be attributed to one on whose bed he is born, and for a fornicator there…

Sahih Muslim Book 17 Hadith 48

Sahih Muslim #1458 a

The Book of Suckling 17:48

Abu Huraira (Allah be pleased with him) reported Allah's Messenger (ﷺ) as saying:

The child is to be attributed to one on whose bed he is born, and for a fornicator there is stoning.

Chapter: The child is for the bed and suspicion must be avoided

Grade: Sahih