Posting ads on websites
Question

I have a website and receive ads. I am like a publisher, meaning that I publish the ads on my website. I have noticed that these ads may also appear on some websites where there are images of women, and other, Islamic websites, and other websites that are free of haraam things.  But I want to know: can I be a publisher of ads?
Praise be to Allah.There is nothing wrong with setting up a website to publish ads, so long as these ads adhere to Islamic guidelines, meaning that they do not contain images of women, or music, and they do not promote the purchase of haraam things such as alcohol, pork or other haraam things, and they do not promote riba-based banking transactions, or websites for corrupt types of tourism, or other dubious things.
You should remember that you are entrusted, in the work you do, with protecting the morals, wealth and honour of the Muslims. So if you remember that Allah, may He be exalted, is watching you in the ads you publish, then you will have fulfilled the trust, but if you fall short and help in spreading that which is haraam and corrupting society, then you will have been negligent and reckless, and you will have betrayed the trust.
Allah, may He be glorified and exalted, says (interpretation of the meaning):
{O you who have believed, do not betray Allah and the Messenger or betray your trusts while you know [the consequence]} [al-Anfaal 8:27].
See also the answer to question no. 93376 .
And Allah knows best.