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:
Earning money from YouTube can be permissible if the creator can prevent or filter advertisements promoting forbidden content. If haram ads consistently appear and cannot be removed, earning income from those advertisements is impermissible; occasional doubtful ads may warrant giving part of the income in charity.
Answering your question, the General Iftaa’ Department in Jordan, states the following:
Is It Halal to Earn Money from YouTube?
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.
When Is Earning Money from YouTube Ads Impermissible?
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.
Almighty Allah knows best.
Source: Aliftaa.jo