Forum Moderators: Robert Charlton & goodroi
More recently some reports have been coming it that the url containing the iframe is sometimes reported as a link in Webmaster Tools. I haven't seen this myself, but I have no reason to think it doesn't happen. I've yet to notice a report of it ever showing up in the link: operator results - but those are so flighty that I'm not surprised.
The accepted values of the rel attribute (according to the W3C) show a link relationship for an anchor element's href url - and a src attribute is not, technically an anchor. The W3C recognizes 15 link relationships [w3.org], but as of the moment "nofollow" is not one of them.
Another interesting bit about how Google evaluates a src attribute is the fact that so-called "hotlinked" images are sometimes reported in Webmaster Tools as backlinks.
All of that is just background for the question - the practice of using nofollow in an iframe. Google has said nothing official about this that I know of. Some people are experimenting with it, and I've even seen some recommending it. But I've seen no results that prove link juice is even sent through a src attribute, to say nothing of being stopped by a renegade rel=nofollow.
So all of that is frustratingly inconclusive. It certainly can't hurt to include a non-standard attribute, but whether it stops any PR transfer is not at all clear - as is the question of whether there is PR transfer in the first place.
I look forward to this thread - maybe we can draw out a post from someone who has something more definitive on the question.
While this would not likely work using rel="nofollow", I can think of another simple way to keep the iframe content from getting spidered.
To do so, make sure that the iframe SRC is calling an application or resource located in a special subdirectory:
src=http://www.example.com/widget-foo/iframe-app.jsp?something=something&etc=etc
Then, disallow the /widget-foo/ subdirectory in the robots.txt file.
I was seeing weird 404's from Google that turned out to be due to the big G's misinterpretation of a JS onclick event:
<div onclick="getAjaxData('/foo/bar');">
Rather than adding rel="nofollow" (and breaking XHTML1.1-strict compliance) I modified my div to
<div onclick="getAjaxData('/disallowed/foo/bar');">
It's been a week now, the 404's have stopped.
Earlier thread here: [webmasterworld.com...]