How To Disable Adblock Users on Your Website

How To Disable Adblock Users on Your Website

So, you have ads on your website or blog, and you have put up ads to help fund the website, and you want to make the most of your ads? If so, read on. This article will show you how to disable Adblock on your website. Many people user adblocking software within their web browsers to block ads. With the help of some javascript tweaking, you can deny them access to your site. This will work for both AdBlock and AdBlock Plus.

Many people use ad blocking software within their web browsers to block ads. Even I use the software Adblock, and sometimes I am enticed to disable it within reason under certain circumstances. With the help of some javascript tweaking, you can deny them access to your site. This will work for both AdBlock and AdBlock Plus.

 

The Redirect Method To Disable Adblock

To disable AdBlock you can use a few methods, this method will redirect users who have Adblock installed to another page. First, you need to create advertisement.js file on your hosting server where your website is, in the root directory. Adblocking software will be triggered by it due to the name, so do not change the name. Then one you have done this, add this code into the file:

document.write('<div id="tester">an advertisement</div>');

Now add this code right under <body> tag:

<script type="text/javascript" src="/advertisement.js"></script>

<script type="text/javascript">
if (document.getElementById("tester") == undefined){
    window.location = "http://yourlandingpage/adblock.html";
    }
</script>

With this code, you will redirect users to your landing page where you can ask them to disable adblocking software in order to approach your page.

The Request Method of Blocking Adblock

If a user likes your content, chances are they will be willing to support your website. That is, as long as you don’t have disruptive or malicous ads. The best way to accomplish asking is to add an HTML code snippet to your website. The code:

<style>
#IFobOXDmeghc {
display: none;
margin-bottom: 50px;
padding: 30px 15px;
background: #143;
text-align: center;
font-weight: bold;
color: #ccc;
border-radius: 10px;
}
</style>

<div id=”IFobOXDmeghc”>
Our Website uses Ads to make revenue to keep the site running.<br>
Please consider supporting us by disabling your ad blocker for this website.
</div>

<script src=”/ads.js” type=”text/javascript”></script>
<script type=”text/javascript”>

if(!document.getElementById(‘xfzvSiCjtqgE’)){
document.getElementById(‘IFobOXDmeghc’).style.display=’block’;
}

</script>

An example of what it will look like:

 

Our Website uses Ads to make revenue to keep the site running.
Please consider supporting us by disabling your ad blocker for this website.

You can also use the Anti Adblock plugin for WordPress on your blog, provided you use WordPress. You can find several plugins here that do just that:

https://wordpress.org/plugins/tags/adblock

You may also like...