Signing up for the Google AdSense program
Question

 
I seek your guidance regarding me signing up with the advertising program Google Adsense. This program is an advertising mediator between two sides, the first is a company or association that owns a website and wants to advertise for it by this paid service. The second is websites’ owners who want these advertisements to be shown on their websites for Google’s favour versus money.
The terms and conditions of Google Company includes that they do not accept advertising for sites of certain activities such as pornographic, gambling, and drugs whether it was the first side or the second. But being non-Islamic company it accepts sites with other haram activities such as banks that deal with interest, forex, movies and songs, tourism, and women affairs. Some normal websites will even show pictures of women with full make up on.
After linking with Google Adsense, I receive the (advertising code) for AdSense, and then I put it on my website (my website is about teaching Chinese). This code afterwards works automatically in this way: the code reads all the words, main words, and all other words on the webpage where the code is on. Then the advertisements automatically come up the page according to the subject of that page. This code also shows the advertisements in accordance with the country of the visitor of the site or page.
The advertisements that the code show get changed in a frequent way which is difficult to observe. So if the website is about cars, most of the advertisements will be also about cars, and if it was about herbs then most of the advertisements will be also about herbs and so on.
If two men are visiting the same website at the same time, one from Canada and the other from Japan, every one will see a different advertisement. Also you will not see an advertisement that you saw yesterday on a page on the same page the next day.
The way of controlling the advertisements shown by AdSense code:
1- Observing all advertisements: this happens via an observation program that enables me to see most of the advertisements on my website now whether in my country or other countries.
2- Filtering: this attributes enables me to prevent a specific advertisement to be shown on my website by adding it to my filter list which is for maximum 200 sites. But this filtering does not mean that a specific advertisement I prevented from showing previously will not be shown again. Google says exactly: “Please note that Google does not commit that all ads for the websites that you add to your competitive ad filter list or ads containing objectionable content will be prevented from display on your site.”
Actually through my personal experiment I found that this filtering really works. Please guide me as this is my main source of income. Note that I do not show any pictures of humans or animals on my website. Also most of the advertisements apart from very few are about teaching languages.
Praise be to Allah.The basic principle is that it is not permissible to sign up for these advertising programs unless one can be certain that the sites advertised are sound and are free of haraam things, because it is not permissible to advertise, promote or help to spread evil. Allah says (interpretation of the meaning):  
“Help you one another in Al‑Birr and At‑Taqwa (virtue, righteousness and piety); but do not help one another in sin and transgression. And fear Allah. Verily, Allah is Severe in punishment” [al-Maa’idah 5:2]
And the Prophet (peace and blessings of Allah be upon him) said: “Whoever calls others to guidance will have a reward like the rewards of those who follow him, without that detracting from their reward in any way. And whoever calls others to misguidance will have a burden of sin like the burden of those who follow him, without that detracting from their burden in any way.” Narrated by Muslim in his Saheeh (4832). 
If the matter is as you describe, and most of the ads that will be placed on your site are for teaching languages and the like, then we hope that there will be nothing wrong with you signing up for this program, especially since you need the money.  
You have to block the ads that go against shar’i rulings. If you are unable to do that, and these ads appear on your site against your wishes, then you have to leave this service because otherwise you will be a partner in spreading and propagating haraam.  
We ask Allah to provide for you by His bounty and to provide generously for you and your family, and to help you in your absence from home. 
And Allah knows best.