• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Ad Blocker Notice

Amin Sabet

Well-known member
Amin Sabet submitted a new resource:

Ad Blocker Notice - A very simple way to show a notice to visitors who are blocking your async Adsense ads

If you are using async Adsense ads, this is an easy way to show a notice to your visitors who are using ad blockers. I've found that a lot of members are willing to whitelist if asked to do so.

Just copy the code provided on this page: http://www.labnol.org/internet/alternate-content-for-adblock/28602/

Paste that code into your footer template just prior to the final "</xen:hook>"

You can add any custom HTML message you want, but keep in mind that any image or span style will...
Read more about this resource...

Amin Sabet

Well-known member
@RoldanLT - As it turns out, they appear to have a policy for anti-adblock messages, along with a mechanism for asking that a message which meets that policy be excluded from their filter:


I'm in the process of requesting this for my message. Will let you know how it goes!

EDIT: I gave up after a few days and withdrew my request.
Last edited:
I keep getting a 403 error when I paste this code in:


// Run after all the page elements have loaded
window.onload = function(){

// This will take care of asynchronous Google ads
setTimeout(function() {

// We are targeting the first banner ad of AdSense
var ad = document.querySelector("ins.adsbygoogle");

// If the ad contains no innerHTML, ad blockers are at work
if (ad && ad.innerHTML.replace(/\s/g, "").length == 0) {

// Since ad blocks hide ads using CSS too
ad.style.cssText = 'display:block !important';

// You can put any text, image or even IFRAME tags here
ad.innerHTML = 'Your custom HTML messages goes here';


}, 2000); // The ad blocker check is performed 2 seconds after the page load


should I contact my host?