Does meta name=robots content=nofollow prevent indexing iframes?

Let's say I have a publicly accessible page that contains an iframe back to a different page on my own domain. By default, google (and other crawlers) will index that page and the iframe's content. It may also associate that iframe content with the parent page, but that's not relevant to this question.

What I want to do is prevent links on the parent page from being crawled, but I still want to allow bots to crawl the iframe. If I add <meta name="robots" content="nofollow"/> to my parent page, does that also tell bots not to crawl the iframe?


If a page has content="nofollow" , google will not index the page and links inside that page also . so your iframe page also will not be indexed . Unless the iframe link is there from some other page also which doesnt have a no follow tag . or create a sitemap with the pages in that iframe and submit to google for indexing.

If i understand your question correctly then you want to really apply a no follow on the links that are inside the iframe?

Personally i would have said this to be more a job on SO then webmasters however, i'm not sure on an exact way of doing this but these may provide a temporary fix but you may want to investigate them before trying.

  • My first approach (but not sure this is exactly what you are looking for)

you can add rel="nofollow" onto an iframe like so <iframe rel="nofollow" src="">

  • My Second approach (i think this would again not be your ideal)

you can use javascript to add in the iframe as javascript will not be indexed. Using this method however will not only apply a "nofollow" rule but it will not get indexed as it is added in using javascript

Another alternative is from this post

This was the top result page#1 on Gxxgle and it had not been answered as of yet. How sad. Absolutely, you kind of can add rel="nofollow" to an iframe. You just must be tricky about it. Here's how... Build a blank html file. Add your iframe to that alone. In the Meta tag include

<meta name="robots" content="noindex,nofollow">

Now, iframe that page onto the one your going to show. Easy as pie.

Nofollow does not prevent crawling

What you probably need to do is one of the following:-

  1. Have all the links on the page be redirects that are blocked using robots.txt
  2. Encode all links on the page using javascript, and have the decoding function in an included script that is blocked using robots.txt to be 100% sure Google doesn't crawl the links

That still doesn't prevent the destination pages being indexed from other links

Need Your Help

Benefits of compiling C code with gcc's C++ front-end

android c++ c gcc dalvik

I am very interrogative and perplexed by this commit on android's dalvik platform pushed a year ago.

setup actionbar sherlock in android studio 0.4.2

android eclipse actionbarsherlock android-studio

I am developing an android project by using actionbrsherlock library. after adding the actionbarsherlock library in android studio , my directory structure is