homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Google / Google AdSense
Forum Library, Charter, Moderators: incrediBILL & jatar k & martinibuster

Google AdSense Forum

How to disable Adsense to a particular url page?

 1:08 pm on Jul 22, 2013 (gmt 0)

I want to block adsense from appearing on a specific url.

Example: I want to stop adsense from showing on the url domain com/page/73/

I know I can block a domain but I only want to block a specific url as above. HOw do I do that? I'm using Wordpress.



 1:29 pm on Jul 22, 2013 (gmt 0)

You probably need to hack the PHP to do an 'else' or 'else if' function [php.net...] to have your AdSense code as an include serve up on all pages except 73. There might be a plugin that already does that, but if not, that's how I'd do it.

[edited by: Play_Bach at 1:55 pm (utc) on Jul 22, 2013]


 1:54 pm on Jul 22, 2013 (gmt 0)

On adsense, there's the "Allow & block ads" option. Do you think i can just add the specific url of my site in there and the ads will stop appearing?


 2:00 pm on Jul 22, 2013 (gmt 0)

I doubt that would work since that's for advertiser URLs and not your domain, but who knows. You could test it and see. If it backfires, then you have to go another way such as hacking the PHP or using a plugin.

[edited by: Play_Bach at 2:09 pm (utc) on Jul 22, 2013]


 2:09 pm on Jul 22, 2013 (gmt 0)

How easy it is depends on the theme you are using and where and how you serve your ads (in the content or in the sidebar)

I don't want ads on my search results pages, 404 pages, privacy policy, contact page, etc. so I removed the sidebars from those pages and also wrote a theme function to keep them from showing on those pages in the content. I also use a plugin to manage my ads.

The Allow & Block feature is only for blocking advertiser URLs and/or specific ads from appearing on your site, as I understand it. You could go into the Account Settings and Access and Authorization, but that seems to be site level only, not specific URLs.


 2:13 pm on Jul 22, 2013 (gmt 0)

Thanks netmeg. I was just editing my post to clarify the advertiser URLs and there you were. Good morning! :-)


 2:35 pm on Jul 22, 2013 (gmt 0)

What plugin are you using, Netmeg?


 2:44 pm on Jul 22, 2013 (gmt 0)

I read this instruction from Google Support. Do you think this apply to my problem?



 2:49 pm on Jul 22, 2013 (gmt 0)

Nope. That's for advertiser URLs, not your domain.


 5:01 pm on Jul 22, 2013 (gmt 0)

We're not supposed to mention specific tools, but it's called adrotate, I'm sure you can find it if you search the wordpress repository.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Google / Google AdSense
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved