How to Block AdSense Being Shown In Specific Countries

If you are an AdSense publisher, sometimes it may essential to block your AdSense ads being shown in specific countries.

One of my friend got the problem, when one of his idiot friend constantly clicking to his ads to getting him banned or see what happens next.

I think there are many method that you can block or prevent ads or being shown off them. But now we are going to do this with DFP (Double Click for Publisher) :) So let’s see how to block ads shown in specific countries.

“Important: You need an active Google AdSense account to signup for DFP”

Table of Contents:

DoubleClick for Publishers
DFP getting started tutorial

How To:

  1. Create Ad Units:
    • Sign in to google double click for publisher. If it is your first time on DFP you have to accept terms & condition, select time zone etc. See This Image.
    • Go to DFP Inventory Ad Units New Ad Unit. See This Image.
    • Fill up the “Name, Description, Size, Target window.” In AdSense inventory settings mark “Maximize revenue of unsold and remnant inventory with AdSense”.
    • Now press “Save”.
  2. Placements:
    • Now we need to define placement of ads. See This Image
    • Go to Inventory tab -» PlacementsNew Placement
    • Mark “Offer this placement to advertisers”
    • Now press “Save”.
  3. Order:
    • Now we need to define the ad inventory. 
    • Go to Orders tab -» New Order. See This Image.
    • Create a company & fill the details under “New line item
    • In “Setting”, Set Type: House, Start time: Immediately, End time: Unlimited, Rate: 1$ CPM. See This Image.
    • In “Add targeting”, Select “Inventory” and include your placement or ad unit that you created, & then select “Geography” and mark the country that you don’t wanna show AdSense. You can add more then one counties. See This Image
  4. Ad Creative:
    • We need to create or upload the house ads that we gonna display instead of AdSense, because we wanna block AdSense or being shown off AdSense .
    • Go to DFPLine Items & select the “Line Item“.
    • Now click Add Creatives -» New Creative and select “Image »” as creative type. You upload image from your PC or use a URL of image.
  5. Generate tag:
    • Now the last step, we need the JavaScript.
    • Go to DFP -» Inventory -» Generate tags. Select your ad unit and click “Generate tags”.
    • Copy & Paste it to your blog.

Now when a reader from specific country visit your blog or site they’ll see the house ads that you created by dfp.


Screenshot of AdSense Being Shown off in Specific Countries

Sign in to DFP
Sign in to DFP
Create Ad Units
Create Ad Units
Ad Placements
Ad Placements
Ad Order
Ad Order
Order Setting
Order Setting
Geo targeting
Geo targeting

Video tutorial:

Pls also see this: What can I do to help prevent invalid activity?

By Sam Azgor

More posts for you:

Sam Azgor (126 Posts)

Hello! ( ◕‿◕ ) ❤, this is Sam Azgor, an ordinary blogger, coder and author of "Tutorial for Beginner".