[Guide] How To Disable Ad-Blockers For Webmasters

If you’re like me and run sites that make money primarily through Google AdSense or similar advertising platforms, it can be very frustrating that a portion of the users visiting the site circumvent the ads with ad blockers. As ad blocker adoption continues to grow year after year, it’s important to look into alternative solutions to monetizing your website or platform outside of display advertising.

If, however, you still feel that display advertising is the best business model and least intrusive option for your visitors, this guide will help you reclaim a portion of that lost income through the use of ad block detection scripts. If you’re using AdSense, keep in mind that AdSense has a custom solution to show a message to all users who are using an ad blocker on your site, which prevents you from having to go through these steps.

While this post is not a discussion over the ethics of blocking ads, it should be used as a more informative way for webmasters and website owners to:

  • Detect if a user to your site is using an extension or program to block ads
  • Display a notice to the user that they are using ad blocking
  • Encourage the user to disable the ad blocking extension or white-list your site
  • Hopefully increase revenue from ads due to more impressions being made on your site

How Do Ad Blockers Work?

Before we get into the nitty-gritty details of what you should do to detect if someone is using an ad blocker, it’s important from a webmaster standpoint to understand how the ad blocking extensions work.

Usually, an ad blocker works as an extension (or add-on) of your browser. If a person visits, for example, cnn.com  – the browser will load the website content and the ad block extension will then block any URL’s that are related to advertising networks. As the website loads, it runs a list of scripts, some of them being scripts that display ads. In less than technical terms, if the page you are visiting loads a script that the ad blocker determines to be related to advertising, the ad blocker will stop that script from completing, resulting in whitespace where the ad should be. Since most websites use a whole host of advertising networks to display ads next to content, the ad blockers and ad networks are constantly playing a game of cat and mouse to try and circumvent each other. It’s a battle that’s been going on for a few years now but has recently picked up speed and adoption rate.

How do I stop my users from using an ad blocker?

Ad Blockers are complex, but thankfully there are a few tools out there which can help you determine which users are using the ad blcokers, and will help you prevent them from viewing your content unless they turn it off. The script that I use to disable ad blockers is called BlockAdBlock. It is a free (not open source) script that not only detects if a visitor is using adblock, but also informs the user with a pop-up over your content and asks them nicely to turn it off before viewing the content underneath. It works great so far, and while it’s too early to tell if it has had a difference in increasing earnings, I will update later on with more stats once they become available. You can customize the pop-up to allow it to appear only once and then display the content underneath regardless of whether of not the user turned off their ad blocking extension, or you can force the pop-up to constantly appear over and over until the script is actually turned off.

Regardless of which option you choose – you should have the user’s best interests in mind.

How Do I Setup BlockAdBlock on my website?

First, head over to their official website: blockadblock.com. From the home page, you’ll see a link that says “customize” in the navigation menu. Here you can change the design of the pop up that covers the content on the page if a user is detected as using an ad blocker extension or program. Once you configure the design of the popup and the message, you can generate a script which can then be embedded on your website (they give details on how to do this after you generate your personalized script).

Here’s how I put the BlockAdBlock script on one of my WordPress websites: 

I copied the script from the customize page, then I went to my WordPress administrator dashboard

  1. Click on “Appearance” > “Widgets”
  2. Create a new “Text” widget and drag it into your main sidebar
  3. Leave the title blank, paste the entire script into the text box underneath the empty title
  4. Save the widget
  5. Test your website to make sure that the script is functioning correctly. If the script doesn’t automatically run the pop-up window, you may have to adjust the pop-up timing settings back at the BlockAdBlock website.
block ad blockers from viewing your content
This is the code that you should put in your text widget on WordPress

These steps are very straightforward, and right after I made the change to my site I saw that it was working correctly when trying to read an article with an ad blocker enabled and the pop-up appeared. For the most part this may come off as an inconvenience for those people who are using the ad blockers to browse the web (I myself use ad blockers religiously, but I also understand that websites need to make a living too).

Note: This website does not have Block AdBlock enabled – as I don’t care if it makes money or not (also, because there’s two ads total on the site). 

If this helped, or if if you ran into problems implementing the script, leave a comment below and I’ll see what I can do to help. Thanks!

3 thoughts on “[Guide] How To Disable Ad-Blockers For Webmasters”

  1. Mine said access denied also. I had to right click the hosts file again. Go to properties, then security and I clicked on edit. Then click on the username you logged in under and click full control and apply. Then start over and save the file.

    Thanks for your help but the ad is still there

  2. What do you think of instead of using any “block adblock” plugin, putting a self-hosted image of an amazon product underneath the adsense ad? That way if the ad is blocked, there is something left for the visitor to see?

    • Yes – that is usually what I do on some of the sites, but sometimes the ad blockers are able to detect outbound links (to Amazon + other ad networks) and block this images as well. It’s a constant battle.

Comments are closed.