Answer
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
If you wish to earn income through YouTube ads, it is essential to filter out ads related to explicit, unethical, or forbidden content. If you cannot control the removal of ads promoting forbidden products, or if these ads consistently appear despite filtering attempts, it is not permissible for you to earn income from YouTube advs in such a case.
Answering your question, the General Iftaa’ Department in Jordan, states the following:
Islam prohibits any action that directly assists in committing haram forbidden acts. Allah says in the Quran: “And cooperate in righteousness and piety, but do not cooperate in sin and aggression. And fear Allah; indeed, Allah is severe in penalty.” (Al-Ma’idah 5:2)
Promoting impermissible content through advertisements is considered assisting in committing forbidden acts. Therefore, if you wish to earn income through Youtube ads, it is essential to filter out ads related to explicit, unethical, or forbidden content. This helps you avoid any suspicion of promoting haram and ensures that your earnings are in accordance with Islamic ethics.
If the content creator cannot control the removal of advertisements promoting forbidden products, or if these ads consistently appear despite filtering attempts, it is impermissible for the content creator to earn income from YouTube advertisements in such a case. This is because the ruling is based on the predominant (common) occurrence of impermissible content.
If advertisements promoting forbidden products rarely appear after filtering, or if impermissible content appears incidentally, such as in ads for permissible products, it may carry a level of doubt at the very least. In such cases, it is advisable for the content creator to give in charity a portion of the earnings to purify their income and be cleared from liability before Allah the Almighty. And Allah the Almighty knows best.
Almighty Allah knows best.
Source: Aliftaa.jo