A man came to the Messenger of Allah ﷺ and said, "I have found a woman of noble lineage and high standing, but she cannot bear children. Shall I marry her?"The Prophet forbade him.He came to him a second time, and the Prophet forbade him again.He came to him a third time, and the Prophet forbade him once more, saying, "Marry the loving and fertile, for I will take pride in your great numbers."
أخبرنا عبد الرحمن بن خالد قال حدثنا يزيد بن هارون قال أنبأنا المستلم بن سعيد عن منصور بن زاذان عن معاوية بن قرة
جاء رجل إلى رسول الله ﷺ فقال إني أصبت امرأة ذات حسب ومنصب إلا أنها لا تلد أفأتزوجها فنهاه ثم أتاه الثانية فنهاه ثم أتاه الثالثة فنهاه فقال تزوجوا الولود الودود فإني مكاثر بكم
[Its chain is hasan] Abu Dawud narrated it in the Book of Marriage, in the chapter on the prohibition of marrying women who cannot bear children, hadith no. 2050, from the hadith of Yazid bin Harun, with this chain. It also appears in Sunan al-Kubra, hadith no. 5342. Ibn Hibban graded it sahih, hadith nos. 1229 and 1230, as did Hakim, 2/162, and Dhahabi agreed with him. The hadith has many corroborating narrations.