View Full Version : iframes and google... a problem

01-26-2007, 12:23 AM
many of my sites use iframe quite extensively... probably too much, heh;)
however i've had a longstanding problem to do with the way search engines display links to a number of my sites.

often the search engine will link straight to the content iframe containing the home page, rather than the index page with nav bars, etc.
a easy example would be to google for "HLJ photography" (http://www.google.com/search?client=opera&rls=en&q=hlj+photography&sourceid=opera&ie=utf-8&oe=utf-8) and click the second link to www.hljphotography.co.uk. as you can see, google takes you straight to http://www.hljphotography.co.uk/home.htm and as such does not show the links and gallery thingy, or the banner

i can put a robots noindex tag on all pages other than index, but that won't much help search engine listings...

so my question is whether there's a way for, when home.htm (or other sub-index page normally displayed in iframe) is loaded, it to check whether the page is inline another (if it has a parent frame), and if not load the index.htm file instead?

an alternative (subtly different but simpler) would be for the home.htm page to automatically reload to index.htm onload unless it detects it has a parent frame (ie it is already inline index)

hope this makes some sense, and i hope its possible!
thanks :)