Sunan Abi Dawud 2264
Grading supplied with this record: Da'if (Al-Albani)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لاَ مُسَاعَاةَ فِي الإِسْلاَمِ مَنْ سَاعَى فِي الْجَاهِلِيَّةِ فَقَدْ لَحِقَ بِعَصَبَتِهِ وَمَنِ ادَّعَى وَلَدًا مِنْ غَيْرِ رِشْدَةٍ فَلاَ يَرِثُ وَلاَ يُورَثُ "
Narrated Abdullah ibn Abbas:
The Prophet (ﷺ) said: There is no prostitution in Islam. If anyone practised prostitution in pre-Islamic times, the child will be attributed to the master (of the slave-woman). He who claims his child without a valid marriage or ownership will neither inherit nor be inherited.
Full reference and source
Sunan Abi Dawud 2264 In-book : Book 13, Hadith 90 English translation : Book 12, Hadith 2257
View source on Sunnah.com (opens in a new tab)