Warning: Watch out for AdBlocks and css naming convention

Content on our company webpage disappeared when users were using the browser plugin AdBlock. I am working in the recruiting industry were we use “Ads” on our own webpage. We advertise our new job offers as such. This is not AdWords Ads or affiliate ads but our own manually created webcontent on our webpage. The problem for us was that our webmaster had named the css class “Adtext” (but in swedish: annonstext) like this:

<p class=“annonstext”> … </p>

All text within this paragraph was deleted by AdBlocks (a browser plugin)

This took us months before we new we had a problem so be sure you test your new web launch with AdBlocks first


@Mittineague, Understood!

I found that out a few years ago but it’s a good tip for developers struggling to find out why some page element doesn’t appear when it should!

For reference AdBlock has a blocklist https://easylist-downloads.adblockplus.org/easylist.txt for reference.

Do you want to say we need to consider the adblocker for devlopment of our websites. I think most of the adblocker didn’t work in the way you shows here. Acutally Adblocker remove the script to get excecuted in the browser so no server action no ad on the webpage.

Are you saying that you changed the class name from “annonstext” to something, and that caused the problem to go away?

If so, I would be very surprised. In general, ad blockers don’t rely on the hosting site flagging the ad in some way. If they did, webmasters would simply make sure that they didn’t do that. After all, they have a vested interest in their ads showing up. Rather, the ad blocker uses an internal list of ad-serving sites to determine which ones to block.

As far as I know, the only way to change the behaviour of an ad blocker is to edit its blacklist and/or its whitelist. It would be up to the individual user to do that.


I agree. It would be a rather useless blocker if everyone could simply rename the elements in their web page in order to bypass the blocker.

There should be absolutely nothing that you can do regarding the code in your web page that will make any difference to adblockers and so there’s no point in even thinking about such things when creating your page.