Forum Moderators: Robert Charlton & goodroi
Let's say there is a website targeting for keyword "keyword1", and then there is an iframe (not a frame, but iframe) with keyword "keyword2". Now the question is - does Google see the iframe as a part of the website? If a user will search for keyword1 and keyword2, will the website appear in the results?
Or maybe Google sees these websites or completely separate documents (thus not indexing "keyword1" and "keyword2" as on one document).
Yes, but also as a stand alone page. Any page that can be loaded by a spider will be treated as a stand alone page. However, if the iframe is on another domain, then it is not part of "that website".
example:
If we iframed pubcon right here in this thread, Google would not see that as part of webmasterworld. However, the pubcon page would receive credit for a 'link'.
another exmaple: if the microsoft forum here iframed a page from the yahoo forum here, both pages would be viewed as stand alone and pr would still flow from the ms page to the yahoo page.
Lastly, don't get caught up in JS/Ajax load games as well. There are a lot of different browser tricks you can play with iframes. Make sure that the page you are looking at can actually be loaded by a spider by a direct call to the "framed" page.
Does that seem like a sensible use of iframes?
What was that? This "massive abuse"? How this used to work?
If Google or other search engines counted iFrame content as part of the main page, this would lead to a type of poor man's site scraping where lazy webmasters would just iFrame other people's content in an effort to trick the search engines into ranking their own sites higher in SERPs.
There is no legitimate reason an iFrame should count as part of the parent document, rather it should instead be counted as a link to the child document, because this is essentially what an iFrame is.
But we can do that (site scraping) easily with a few lines of php code. That's why Google detects duplicate content, isn't it?
You could, and it happens, but my sense is that Google is finding ways to further reduce the damage scraping (although I won't say it doesn't happen, especially for weaker websites, or websites that are in the process of building)