Skip to navigation

Skip to additional stuff


Friday, October 22, 2004

Display Google AdSense on password-protected pages

The Google AdSense FAQ says:

Place ads on pages that don’t require a login.

What if the main part of your site is a password-protected member area? No AdSense? No earnings? No! Here comes a quick technique that allows you to place AdSense with content relevant ads on every page you want.

Google AdSense

AdSense automatically delivers ads targeted to your content on a page-by-page basis. After you’ve visited a page that contains an AdSense banner, soon a bot named “Mediapartners-Google” will visit exactly that page. It’ll use exactly the same address. And it will get what the script (sites that require a login are using some kind of server-sided scripts) gives to it. That’s all we have to do. Change the content of the specific page. Mostly the script will display something like “Login required” when the Google bot comes, because it’s not logged in. Google will scan that page in order to display ads targeted to your content. That page normally won’t contain relevant content. You can change that. Add some meaningful content, and if you want to, you can put it in a div and set display: none to hide it.

That way, you can force AdSense to display the ads you want. Create a nice keyword list, or something else. Even on pages that display e.g. some boring user details, AdSense will display relevant ads.

6:25 pm | Filed under: , 1 Comment | the j-blog

1 Comment on “Display Google AdSense on password-protected pages”

  • 1.
    Posted by
    Augustine
    2006-5-2
    9:16 am

    You can go one step further, if the area you protect doesnt contain very critical info. You can allow access to the pages to google media bot, without login. Anyone with some PHP (or whatever lang you use) can allow google bot, based on IP address range and user agent name. Note that google mediabot and normal googlebot are differnt, so no chance of your secure page appearing on a google cache.

Leave a comment

Your e-mail address will never be displayed.

(required)

(required)



Navigation



© Copyright Julian Bez 2010. All rights reserved, unless otherwise mentioned.
For your convenience: All times are GMT.
Built with valid things such as XHTML and CSS.

PLEASE NOTE: This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device. more info...