Beginner's Guide for WordPress / Start your WordPress Blog in minutes

How to Detect AdBlock Users in WordPress

Do you want to detect AdBlock users in WordPress and show them targeted messages?

Adblock Plus is a popular software which blocks advertisements on the internet. It is available as an add-on for all top browsers, mobile apps, and even as a dedicated browser.

Now the problem is that most bloggers rely on the ad revenue to support their website. Software like AdBlock plus hurt their revenue potential and ultimately their plans to grow their business.

In this article, we will show you how to detect Adblock users in WordPress and share ways to bypass the Adblock software.

Detect and bypass AdBlock users in WordPress

What is AdBlock and How it Hurts Website Owners?

Adblock Plus and other adblocking software allow users to automatically detect and block advertisement on websites.

While Adblock brings a cherished ad-free experience to users, it can hurt bloggers and website owners who rely solely on ad revenues.

Research published by Global Web Index shows that adblocker usage has increased over the past few years.

Nearly 47% of internet users have some kind of adblocking software installed on their devices.

Adblock usage study

Adblocking on mobile devices has increased many folds and is now higher than desktop computers.

Another research conducted by Ovum estimates that publishers will lose $32 Billion to Adblock software by the year 2020.

This is a serious problem affecting many websites particularly blogs that rely on advertisements as their primary source of revenue.

What should you do about Adblock as a publisher?

There are several measures that website owners have taken in this regard.

1. The Do-Nothing Approach

As the title says, you do nothing about the users with Adblock. You simply learn to live with the loss of revenue for the sake of happy users.

2. Passive Approach

You can nicely ask your users to whitelist your website with a promise of quality content and non-obtrusive ads. There is no way to know how effective such an appeal would be.

Another alternative is to create a membership website with paid subscription plans. You can promote paid plans as an ad-free experience with additional content and features.

Reddit is a great example of this approach with its ad-free Reddit Premium plan.

Reddit premium

3. Aggressive Approach

In this approach, you simply block access to your website for all users with AdBlock enabled. If they want to view your content, then they must disable AdBlock.

AdBlock wall on Forbes

This kind of anti Adblock approach is rather aggressive, and it will turn away users from your site. Studies show that 77% of Adblock users leave websites with Adblock walls.

It’s best to use the passive approach that we mentioned above.

How to Detect AdBlock Users in WordPress

Before you can request users to whitelist and support your website, you need to be able to detect the AdBlock users. Fortunately, there are plenty of ways to do that in WordPress.

We will show you a few different methods, and you can choose the one that best suits you.

1. Detect and Target AdBlock Users with OptinMonster

OptinMonster is the best lead generation software in the market. It helps you convert website visitors into subscribers and customers.

OptinMonster comes with a built-in ad blocking detector which allows you to show targeted campaigns to users with ad-blocking software installed on their devices. This includes popular software like AdBlock, AdBlock Plus, and uBlock Origin.

First you will need to sign up for an OptinMonster account. You’ll need at least their Growth plan to access the AdBlock targeting.

Once you have signed up, you can head over to your WordPress site to install and activate the OptinMonster plugin. For more details, see our step by step guide on how to install a WordPress plugin.

This plugin acts as a connector between your website and OptinMonster.

Upon activation, you need to click on the OptinMonster icon in your WordPress admin bar. You’ll be asked to connect your OptinMonster account authorizing your website or entering an API key.

OptinMonster API key

After authorizing OptinMonster, click on the ‘Create new campaign’ button at the top.

Create new campaign

This will take you to the OptinMonster website.

First, you will need to choose a campaign type. If you want to take the passive approach, then you can use the lightbox popup campaign type. On the other hand, if you want to aggressively lockout AdBlock users, then you can use the Fullscreen campaign type.

Choose a campaign type

Next, you need to choose a template for your campaign. For this tutorial, we are using the ‘Target’ theme, but you can choose a different template if you want.

Choose template

Now you will be asked to choose a title for your campaign. After that, you will be redirected to the OptinMonster’s campaign designer.

From here, you need to change your optin view to the ‘Yes/No’ view by clicking on the buton at the top and then turning on ‘Display Yes/No view’.

Enable Yes / No view

After that, you need to simply point on any element in the optin preview to edit it. You can click on the text to add your own copy.

Change campaign text

Next, you need to click on the yes and no buttons to edit their text. We have changed the yes button to ‘I have disabled AdBlock’ and the no button to ‘I will think about it’.

After that, you need to click on the ‘Display Rules’ tab. Under the first rule, you need to select ‘user has adblock enabled’.

Enable adblock detection rule

After that, make sure that the current URL path is set to every page. This will display the popup on all pages of your website.

Display popup on everypage

Click on the ‘Next step’ button to continue.

Now you’ll be asked to select the default view. Make sure that it is set to Yes/No view and then click on the ‘Next Step’ button.

Select view for your campaign

Your Adblock campaign is almost ready. Let’s publish it to make it available on your website.

Switch to the ‘Publish’ tab in the builder and change the status option to live.

Publish your Adblock tracking campaign

You can now save your campaign to store your changes.

Next, switch back to your WordPress admin area and click on the OptinMonster menu from the admin sidebar. You’ll see your new Adblocker tracking popup under ‘Campaigns’ tab. If you don’t see it, then click on the ‘Refresh campaigns’ button.

OptinMonster campaigns

Make sure that the campaign status is set to live.

That’s all, your Adblocker campaign is now live on your WordPress website.

You can test out your campaign by installing the AdBlock extension in your browser and visiting your website. You will see a popup asking users to support your website by disabling AdBlock.

AdBlock detector popup

For an aggressive approach, you may want to see this guide on how to lock out AdBlock users with OptinMonster’s AdBlock targeting feature. This will allow you to block adblock users from viewing your content until they disable adblock software.

AdBlock lockout

2. Target AdBlock Users with AdSanity Plugin

AdSanity is one of the best ad management plugins for WordPress. It has a paid ‘Adblock Detection’ add-on that allows you to detect users with ad blocking software and restrict their access to your website until they disable ad blocking.

First, you need to install and activate the AdSanity plugin. After that you need to install and activate their Ad Block Detection add-on. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation of both plugins, you need to visit AdSanity » Settings page and click on the Add-Ons tab.

AdSanity Ad Block detection settings

AdSanity allows you to detect AdBlock on posts and pages. You can show a warning popup to AdBlock users with your custom message, or you can redirect them to a custom page.

Both methods are aggressive and would require users to disable AdBlock to continue browsing your site.

3. Detect AdBlock Users with deAdblocker

If you are looking for a free option that allows you to detect AdBlock users, then you can try this method.

First, you will need to install and activate the deAdblocker plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Note: this plugin shows an outdated notice in WordPress, but we tested it, and it works just fine with the latest version.

Upon activation, head over to Settings » deAdblocker page to configure plugin settings.

deAdblocker settings

The plugin allows two methods to show a custom message to AdBlock users. You can either display a notification bar on the top of your website or show a lightbox popup.

Both options are dismissible, and users will be able to ignore the message to continue browsing your website.

Don’t forget to save your settings. You can now visit your website with AdBlock extension installed in your browser to test the plugin.

AdBlock popup

Tips on Mitigating Adblock Losses

Internet users are finding more ways to block ads across the internet. Fighting ad blocking software can be tiresome and an unending struggle to recover lost revenue.

One thing to consider is changing the way you make money on your website. Finding new ways to monetize your content will give you the freedom to rely less on ads and build a sustainable business in the long run.

Diversify Your Revenue Streams

Publishers are finding new ways to combat ad blocking and protect their earnings. At the same time, ad blocking software are getting better every day.

Research shows that privacy, security, and bad user experience are the most common complaints among AdBlock users. Publishers can address these complaints by adapting different monetization methods that address those issues.

1. Affiliate marketing

Affiliate marketing is one of the most common ways to earn money from your content. You can recommend products and services to your users and earn commission when users make a purchase using your affiliate link.

There are plenty of plugins and tools for affiliate marketers that will help you get started.

For more details, see our beginner’s guide to affiliate marketing.

2. Selling direct ads

Advertise page on Buzzfeed

If you are serving ads through a third-party advertising network like Google AdSense, then you have limited control on ads, privacy, and the CPC.

Selling ads directly to advertisers allows you to ensure privacy, limit tracking, and control what you get paid.

WordPress ad management plugins like AdSanity allow you to serve your own ads as well. You can use hosted images on your own websites for ads and easily bypass most adblocking software.

Tip: Don’t wrap your ads around HTML elements with CSS classes like ads, advertisement, promo, etc. This is how AdBlocking software detect and block ads.

3. Sponsored Content

Allow advertisers to sponsor content on your website. You can write content about their product or service, and you can even include an affiliate link to get referral commission. You can also accept user-submitted posts directly on your website.

4. Premium Content

Another helpful strategy used by many online publications is premium content. You can adapt a pay per view model, membership plans, sell online courses, or simply restrict pages to paid users.

Paywall on the Washington Post website

For more ways to diversify your website’s revenue, take a look at our guide on different ways to make money online from your website and easy to start new online business ideas.

We hope this article helped you learn how to detect and bypass AdBlock in WordPress. You may also want to see our guide on how to create an email newsletter or 10 marketing data that you must track on every website.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

22 CommentsLeave a Reply

  1. And if i only want to know how many of my readers use addblock ? i don`t want to show them any warning/etc.. i only need to know how many users use ads block

  2. Nothing is a bigger turn off for me than a site that tells me I’m using an Adblocker. I know I’m using an ad blocker. You mentioned Forbes in a recent comment – I’ll say this. I used to frequent Forbes’ site a lot until they prevented me from viewing content completely for my ad blocker. I can find that same information somewhere else within seconds with a click of my Back button back to Google. I’ve never been back to Forbes since and I’m sure I’m not the only one. The Internet is too vast for me to deal with turning my ad blocker off in order to view a site. I can google a new one ten times quicker.

    Ad revenue has to be minimal at best these days. It’s no longer 1998… I feel like the best blogs and websites leverage tactics that offer me, the viewer, MUCH more value – like an email list, and they’ll get tons more cash out of their viewers that way because they are offering something of value to someone so it’s win win. Looking at a commercial on the sidebar is a waste of my time.

    Just my two cents. I run some ads on some of my blogs and I’ve done well with them but I feel like there are smarter ways to keep my blogs up and running going forward =)

  3. Perhaps this post should be updated to reflect changes at Forbes, who no longer use the “Agressive Approach.”

      • Not to beat a dead horse, but I can access Forbes’ text content with either AdBlock or UBlock enabled, which is different from how it used to be. (It may be different for video content, though.) I work for a company that like many, relies on ad revenue, so this is one of those issues I watch closely. We have chosen to offer premium content to offset any decline in ad revenue and haven’t blocked the blockers.

  4. This plugin doesn’t work. even their own demo doesn’t work. The plugin was updated a month ago though :-s

  5. Locking visitors and allow only logged in users?

    For visitors appear the message:

    AdBlock detected, disable or register.

    After you log in, the message no longer appears.

    Is it possible to do that?

    Thank you. Excellent plugin!

  6. Both sides are right and both sides are wrong.

    Businesses cannot survive without advertising and they sure as hell can’t survive on “donations” alone. To suggest otherwise is just being ridiculous.

    Certainly, if marketing IDIOTS didn’t create such extremely obnoxious and annoying advertising schemes, ad blocking software would be a lot less popular.

    People HATE going to a web site that throws up a centered window and darkens the screen so the content cannot be viewed UNLESS the ad is clicked or acknowledged! It is also ridiculous that one should be forced to view a commercial longer than 10 seconds to see content that should only take a minute to read or view. Idiot advertisers have brought this on themselves.

    And, yes, there are sites that may infect your computer with malware HOWEVER such protection is a job for ANTIVIRUS software, NOT ad block software. You can be infected by a site running NO advertising. Duh!

    On the other hand, the “99%” fails to consider that plenty of sites run legitimate, passive, sidebar-oriented marketing schemes that put the job of drawing attention on the ad creator without annoying the hell out of everyone.

    Either way, whoever runs a site that detects and/or prevents visitors running ad block software is absolutely within their right to do so. Advertising pays the bills for some of the most popular sites on the Internet. Blocking ads while viewing content is the SAME as STEALING.

    The world doesn’t work for free. Don’t like it? Too effing bad. It’s the truth.

    • “Blocking ads while viewing content is the SAME as STEALING.”

      Totally wrong… and a business that relies on advertising to make a profit should instead focus on selling a product that people will actually pay for.

  7. Pretty helpful article. Easy to understand. Helped me to impress my visitors with a cute pic for unblocking adblocker :D

  8. Haven’t heard about this plugin but I am using a simple code shared by to display my affiliate ads to ad block users.

    Which one is better? Plugin or direct code.

  9. Two options I am considering (because adblock-blocker plugins seem to be able to be blocked by adblock). If anyone can provide code for these, it would be appreciated. Our site is already free and ads unobtrusive. All Adblock does is deny our hardworking writers any chance of earning any income.

    1. Conditional statement. IF ad not displayed, don’t show page / use alternate css / show massive image that blocks page)

    2. CSS. Two options in CSS. If ad displayed, fine. If ad not displayed, display a massive image (which blocks page).

    3. Wrap content in script of the ad.Two options I am considering (because adblock-blocker plugins seem to be able to be blocked by adblock). If anyone can provide code for these, it would be appreciated. Our site is already free and ads unobtrusive. All Adblock does is deny our hardworking writers any chance of earning any income.

    1. Conditional statement. IF ad not displayed, don’t show page / use alternate css / show massive image that blocks page)

    2. CSS. Two options in CSS. If ad displayed, fine. If ad not displayed, display a massive image (which blocks page).

    3. Wrap content in script of the ad.Two options I am considering (because adblock-blocker plugins seem to be able to be blocked by adblock). If anyone can provide code for these, it would be appreciated. Our site is already free and ads unobtrusive. All Adblock does is deny our hardworking writers any chance of earning any income.

    1. Conditional statement. IF ad not displayed, don’t show page / use alternate css / show massive image that blocks page)

    2. CSS. Two options in CSS. If ad displayed, fine. If ad not displayed, display a massive image (which blocks page).

    3. Wrap content in script of the ad.

    • Sorry, but until you folks figure out a way to stop the hijackers, block the popups that interfere with browsing, or watching a video legally acquired, I am going to continue to black as much as I possibly can. Find another way to earn money. We do not feel sorry for you.

      • Bob, why don’t you stop going to the websites that people worked hard to create then? You didn’t write any of the content for them yet you want to deny them any type of earning from said content?

        You want someone to write hours, days, months of content for you to enjoy for free… but you want to block their only point of revenue for this? You want someone to pay to rent their VPS or shared hosting, pay for the domains, pay for royalty free graphics to use on the website… but don’t want them to earn any of it back?

        “We do not feel sorry for you” – Of course not, you’re probably too to figure out how much work it takes make a website or the content on it.

        • I do agree with Bob. The problem here is NOT the fact that ads are used to earn money, but the fact that ads are overwhelmingly ABUSED by many sites, used for hijacking, introduce viruses and/or gather personal data about browsing habits without people’s concern. Not to mention that in many cases they are obtrusive and plain annoying. Ever tried YouTube without an ad blocker? You will be FORCED to watch a several-second video ad practically EVERY TIME you want to watch someone’s video, and you can’t even skip it: you HAVE TO WAIT until it plays 80..90% of it! I should be charging Google for my time lost! Ever tried a popular download site? You will get dozens of identically-looking download buttons which all of them lead to downloading a virus or an adware, and only one directs you to the desired destination. And so on…

          So… stop about complaining ad-blockers and start thinking why they exist in the very first instance. And moreover, you gotta be stupid: you want to get traffic in order to be able to pay your internet bills, yet you start blocking users. Be sure they will never return! Even if they disable the ad-blocker, something already tells them that the CONTENT is of little (if any) importance, as you are obviously giving more preference to the ADs!

          And above all: ad-blocking is a RIGHT.

        • It is much easier for users to hide ads than for the entire industry to develop advertising ethics.

        • Unless you can guarantee that your advertisers are 100% SAFE and HONEST, and unless they STOP using adverts that gum-up my system with their bandwidth-hungry content, WE will SKIP your websites and REPORT HEN+M as unsafe by every means possible!

          The 99%

      • Hear! Hear!

        i find that the best way to earn revenue with a website is to be open and straight-up with people and ask them to either BUY products or services or DONATE to help maintain the website.

        Adverts are a vehicle for FRAUD and PHISHING!

        See it > Report it as Unsafe > Block It > Tell people on Social media to AVOID IT!

        JOB DONE!

        The 99%

  10. Be careful about using plugins like this one that don’t rely on JS to make the decision. I.e. if you are using a cache plugin, you’ll end up showing the wrong thing to the wrong people.

  11. @WPBeginner
    this is really unique way of detecting adblock users and requesting them to whitelist our blog.
    thanks for this fresh and unique post.
    I have downloaded this plugin and I will use it on my all blogs. :D

Leave A Reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.