Search Engines and Frames
By Danny Sullivan, Search Engine Watch, March 15 2007

Search engines have a tough time with frames. Using frames can prevent them from finding pages within a web site or cause them to send visitors into a site without the proper frame "context" being established. Both problems can be corrected, with a little foresight by webmasters.

Say More Than Sorry To Search Engines

Many sites use frames for navigation, and the fictional "Wonderful World of Stamp Collecting" site in this tutorial is a typical example of this. It has three frames: one for navigation, one for the site's title and one as the main content window.

The content for these frames actually came from three different pages and was blended together according to the instructions of a fourth "master" page, also called the "frameset" page.

In contrast, most search engine spiders will only see the master page. Just like an old browser, they don't understand the instructions on how to produce the frame layout. These are ignored, and only information within the noframes tags is read (information which a frames-capable browser will ignore).

So what do frame-challenged search engines see in our test? This is pretty typical of some frames-based sites:

Sorry! You need a frames-browser to view this site.

Obviously, we need to provide search engines with a much better description of the site than this. There is also another problem. There are no links within the noframes area to pages within the site. That means the search engines won't crawl past our master page. We could have hundreds of information-packed pages inside the site, but this simple mistake essentially makes them invisible to many search engines.

Your Friend, The NOFRAMES Tag

One solution to the description problem is to add meta tags to the master page. However, meta tags are only a partial solution, because not all the search engines support them. Meta tags also don't help human beings that want to view your site but lack frames capability.

When I originally wrote this article in 2000, the noframes information could go immediately after the first frameset tag, if you wanted the text to be as high as possible on the page. Placing it above above the first frameset tag disabled the frame information in Netscape, although Internet Explorer was unaffected and displayed the frames correctly.

Also, at that time, including body tags within the noframes tags worked with either browser. It helped ensure that the body tags existed for any browser or search engine that might require them.

Remember to give your frame pages a title, even though it won't appear when the pages are viewed in their proper context. Titles are the most important element that a search engine indexes, so you want all your pages to have them.

Reestablishing The Frame Context

Some webmasters never anticipate that pages may be viewed outside the frames context. These pages may lack links back into the site, essentially "trapping" inexperienced web surfers on the page.

This situation will happen even if you ignore all the advice above about making the site more accessible to search engines. That's because some are frames-capable. They will crawl your site and index each individual page, and thus visitors will enter the site out of context.

Fortunately, an easy answer is to include a "home" link at the bottom of all your pages.

Next Article »