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="http://mysite.com">
- My Second approach (i think this would again not be your ideal)
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:-
- Have all the links on the page be redirects that are blocked using robots.txt
That still doesn't prevent the destination pages being indexed from other links