$
I like your free website.
Please keep working!
Stop
Doing
This
Disable AdBlock to support
the free websites you like!
Just 2 clicks:

Disable AdBlock.com

AdBlock
  • Pause
  • Options
  • Don't run on this domain
  • Help
 

Nobody likes ads but they are the necessary evil of almost every free service.

Website owners wouldn't bother spending time and money to create and mantain free websites without any income.

Be fair and consider pausing your ad blocker to support the creators who work hard to create value.

Keep the Internet free!

How to Disable AdBlock?

Just two clicks!

That's what it takes for the visitor but it helps the website creator to keep the site alive and invest in further development.

Give webmasters a chance and enable AdBlock only if they show too many annoying ads and popups.

Turning off or temporarily disabling the ad blocker varies on each browser and version. Look for the icon in the website extension list and select the correct option in the dropdown menu.

How do AdBlockers Work?

First we need to understand how adblockers work. While a web page is loading the browser is downloading the HTML code with all the referenced internal and external resources such as images, CSS stylesheets and JavaScript files.

AdBlock, ABP and other ad blocker extensions have a list of keywords that mark elements that won't be allowed to be loaded and rendered. For example the webpage won't display images with the blacklisted "adBar" class. This "blacklist" includes but is not limited to HTML elements. It doesn't load JS files named wp-banners.js or iframes with URL parameters like ?adCount=.

Google AdSense is the most popular advertising platform used by publishers to monetize their websites. To block them, ad blockers disable loading its main script, called adsbygoogle.js. This can speed up the loading speed considerably.

For the complete list of blocked elements visit easylist.txt [our website is also listed].

How To Detect AdBlock?

Now that we understand how they work we can fight back. Wrap your ad banners in a div element and check its height with a script. If the banner didn't load then the height of the wrapper is zero.

<div id="wrapper">
		<div class="adBar">
			&nbsp;
		</div>
	</div>
	<script>
		document.addEventListener("DOMContentLoaded", function() {
			setTimeout(function() {
				if (document.getElementById("wrapper").offsetHeight) {
					document.getElementById("wrapper").innerHTML = 'No AdBlock';
				} else {
					document.getElementById("wrapper").innerHTML = 'AdBlock Detected';
				}
			}, 1000)
		});
	</script>
	

We have the #wrapper div and an .adBar div inside of it with a non-breaking space character. If the browser does render the .adBar then the size of #wrapper will be greater than 0. Our script is executed one second (1000 milisecods) after the page has finished loading. It checks the offsetHeight of #wrapper and displays a message if it's height is greater than 0.

If you use AdSense then you don't need the .adBar div. Simply put your AdSense banner in the #wrapper and you are ready to go. Read more about this solution here

Other Option, Using wp-banners.js

I have mentioned that ad blockers disable external JavaScript files that are named as one of the blacklisted keywords, like wp-banners.js.

Our simple example below shows a text warning to visitors, asking them to disable AdBlock and loads an external wp-banners.js script that hides the message.

HTML markup:

<div id="myMessage">
		<h2>Please <a href="https://disableadblock.com/">Disable AdBlock</a></h2>
	</div>
	

External JavaScript, named wp-banners.js:

document.addEventListener("DOMContentLoaded", function() {
		setTimeout(function() {
			document.getElementById("myMessage").style.display = "none";
		}, 100)
	});
	

Online Demo

As you can see, there are many ways to detect leeching visitors. You have seen how to detect them and using one of these examples you can implement your own custom solution.

Unfortunately we can't bypass ad blockers but we can completely disable websites for unwanted visitors or we can ask them nicely to allow ads.

Widgets For Webmasters

Would you like to ban adblock users but you don't feel like coding?

Use one of our free widgets to detect adBlock users and show them tailored messages and animations asking them kindly to whitelist your website.

Check out our widget gallery!

Widgets »

Agreement

Obligations of the Creator

  • Create valuable content
  • Update the website regularly
  • Pay for the domain name
  • Pay for uninterrupted servers
  • Promote the website
  • Do search engine optimization
  • Learn and use the latest technologies

The creator mustn't display too many or misleading ads, respecting Better Ads Standards.

Obligation for the Visitor

  • Enjoy the website and disable AdBlock

How?