Marrying relatives and the hadith “Choose strangers for marriage”
Question

I want to know how sound the hadith “Choose strangers for marriage” is, which is widely circulated among people. Is marrying relatives not encouraged in Islamic teachings?
Praise be to Allah.Firstly:
In some hadiths it is encouraged to seek strangers or non-relatives for marriage, but none of these hadiths have been proven to be soundly narrated from the Prophet (blessings and peace of Allah be upon him).
Al-Hafiz Ibn al-Mulaqqan (may Allah have mercy on him) said:
I have not seen anything regarding this topic in any book of hadith that could be reliable."(Al-Badr al-Munir  7/500).
There follow some of the hadiths that have been narrated concerning that:

“Choose strangers for marriage”

Shaykh al-Albani (may Allah have mercy on him) was asked about that and he said: It is da‘if (weak).
He was asked: Have any sahih (sound) hadiths been narrated which encourage marrying non-relatives?
The shaykh replied, No. "(Silsilat al-Huda wa’n-Nur (tape no. 594, 0.53).

“Do not marry close relatives, for the child will be born unhealthy.”

Al-Hafiz Abu ‘Amr Ibn as-Salaah (may Allah have mercy on him) said:
I have not found any reliable source for it. End quote.
It was narrated by al-Haafiz Ibn al-Mulaqqan in al-Badr al-Munir (7/499).
As-Subki mentioned it in Tabaqat ash-Shafa‘iyyah (6/154) among the hadiths that were quoted by Abu Hamid al-Ghazali in Ihya’ ‘Ulum ad-Din for which he found no isnads.
Shaykh al-Albani (may Allah have mercy on him) said:
It has no basis and cannot be attributed to the Prophet (blessings and peace of Allah be upon him). It is well known nowadays among those who pretend to be knowledgeable, and some doctors, who do not fear Allah when teaching their students, so they teach them views and ideas that have no proof or evidence. There are some hadiths that do not have a leg to stand on, and have no basis in the words of the Prophet (blessings and peace of Allah be upon him), such as this hadith. I have been asked about it many times by some of their students."(As-Silsilah ad-Da‘ifah  5365).
Some scholars stated that it is recommended to marry a woman who is not a relative.
Al-Ghazali (may Allah have mercy on him) said:
She should not be a close relative, because that reduces desire… End quote from Ihya’ ‘Ulum ad-Din (2/41).
Ibn Qudamah (may Allah have mercy on him) said:
You should choose a woman who is not a relative, for her children will be more intelligent. Hence it was said: Marry non-relatives so that you will not have weak children. One of them said: The children of non-relatives are more intelligent, and the children of cousins are more resilient. Moreover, there is no guarantee that enmity will not develop in the marriage, which could end in divorce, and if the wife is a relative, that may lead to severing ties of kinship, which we are enjoined to uphold."(Al-Mughni  7/83).
But this ruling is not agreed upon among the jurists. Some of them rejected this idea, quoting as evidence the fact that the Prophet (blessings and peace of Allah be upon him) gave his daughter Fatimah in marriage to her paternal cousin ‘Ali ibn Abi Talib, and he gave his daughter Zaynab in marriage to her maternal cousin Abu’l-‘As ibn ar-Rabi‘, and so on.
As-Subki (may Allah have mercy on him) said, commenting on the view that it is recommended to marry non-relatives:
This ruling cannot be sound, because there is no evidence to support it. The Prophet (blessings and peace of Allah be upon him) gave his daughter Fatimah in marriage to ‘Ali (may Allah be pleased with them both), and she was his close relative."(Quoted from Mughni al-Muhtaj by ash-Sharbini 4/206).
Shaykh Ibn Baz (may Allah have mercy on him) was asked:
I read something that said, “Marry non-relatives lest you have unhealthy children.” Is it a sahih hadith? Are there any other hadiths about this topic? We hope that you can explain what is the sound Sunnah with regard to the issue of choosing a wife.
He replied:
This has no basis; rather it is better to marry relatives, as the Prophet (blessings and peace of Allah be upon him) gave his daughters in marriage to some of his relatives. As for the view of some jurists, there is no basis for it; rather it is optional. If a man wants to marry relatives such as his paternal cousin or maternal cousin, or if he wants to marry a non-relative, there is nothing wrong with that.
As for the view of those who say that marriage to a non-relative will produce more intelligent children and is better, there is no basis for that and no evidence to support it. If there is a relative who is good, it is more appropriate to marry her, and marriage to her may be regarded as upholding ties of kinship. But if there is a non-relative who is better-looking and better in character, then marrying a non-relative is better.
The point is that the man should seek a righteous wife, whether she is a relative or not, because the Prophet (blessings and peace of Allah be upon him) said: “Women may be married for four things: their wealth, their lineage, their beauty and their religious commitment. Choose the one who is religiously-committed, may your hands be rubbed with dust (i.e., may you prosper).” So the believer should seek a woman who is religiously committed and good, even if she is not one of his relatives; by the same token, women should seek a righteous husband and ask about him, even if he is not one of her relatives."(Fatawa Nur ‘ala ad-Darb  tape no. 831).
For more information, please see the answer the question no. 72263 .
And Allah knows best.