Can google see the referer for pages on which there are adsense ads?
As far as I know, an iframe sees the page on which it's embedded on as the referer, but I could be wrong.
Can google see the referer for pages on which there are adsense ads?
As far as I know, an iframe sees the page on which it's embedded on as the referer, but I could be wrong.
yes, absolutely. make sure to hide your referer if you have a questionable source of traffic.
and keep in mind.........the big "g" can see way more than your regular affiliate networks.
Any idea on how it's done?
I tried to recreate it with the following scenario:
First, we have ref.php
Loading this script will simply display "none".
ref.php
If we link to it with link.php, ref.php to display "link.php" as the referring site.Code:<?php if (isset($_SERVER['HTTP_REFERER'])) echo $_SERVER['HTTP_REFERER']; else echo 'none'; ?>
link.php
iframe.php places ref.php in an iframe. If we load iframe.php directly we will see "none" as the referer to iframe.php, and "iframe.php" as the referer to ref.php.Code:<a href="ref.php">link</a>
iframe.php
Now if we change link.php to link to iframe.php instead of ref.php, we will see "link.php" as the referer to iframe.php, but ref.php will keep detecting "iframe.php" as the referer. It will not detect link.php. The attachment shows the output.Code:<?php if (isset($_SERVER['HTTP_REFERER'])) echo $_SERVER['HTTP_REFERER']; else echo 'none'; ?> <br /> <iframe src="ref.php" width="400" height="100"></iframe>
link.php
Code:<?php ?><a href="iframe.php">link</a>
So in essance, link.php is the site that sends you traffic, iframe.php is your site, and ref.php is the google ad. In the above example, there is no way for ref.php to find out about link.php.
So how does google do it? It has access to the same headers as everyone else does.![]()
I actually wrote a bit about referer leaking with iframes yesterday on the bhz blog. Iframes, under certain conditions with certain browsers, will absolutely leak the referer, even with various cloaking mechanisms in between.
On top of that, in my humble opinion, the biggest issue with trying this with AdSense is that it is programmatically very simple to follow iframe stacks "up" and "down" if you have as much indexed site information as Google. Unless your top level blog wasn't indexed by Google, it would only be a matter of time.
That said, as far as I know, Google only discourages displaying ads in iframes because the spider isn't able to capture the text on the same page as the ad, hence less relevant ads. I don't believe they've outlawed it completely, but I may be wrong. AdSense isn't really something I spend too much time thinking about![]()
Nhoc.SieuWay (01-14-2010)


I agreed with you oldenstylehats. It is better to play safe otherwise, use a dummy adsense account to test out. Better to be safe than sorry.![]()
What if you put all the content on your site (including the ads) in an iframe? This way the ad has access to the keywords but will only see your iframe parent as the referer. Any reason this wouldn't work?


You could iframe a white-hat site's adsense block kinda like cakeslicing a cpa ad.
You could content cloak, and insert the iframe whenever a human user is there, when in doubt insert adbrite or some other contextual adverts.
As for relevancy, just create low value white-hat content keyed into your splog niche and host it on a parasite that allows adsense.
Bookmarks