SEO

Should URLs in links use index.html?

When it comes to the best URL structures and formats, the most common question I get is in regards to the best way to reference directory index pages in links.

Everyone asks, which is better…

A. http://www.mysite.com/locations/
B. http://www.mysite.com/locations
C. http://www.mysite.com/locations/index.html

The answer is: “Just be consistent,” says Google’s Adam Lasnik in his post about how to avoid duplicate content. There you have it, straight from Google.

Why consistency is important: Search engines see different versions of a URL as separate pages, which means you end up splitting out your link popularity and creating duplicate content. Don’t worry about penalization if you have each version in links to your page. You won’t be penalized; however, since it’s splitting up your link popularity, it’s not helping you out.

It’s OK if it’s different for each page of your site. Ideally, for ease of maintenance, site-wide consistency is ideal. However, you may have different programmers working on different sections of a website, each doing it differently. Your site may be set up so that links to Page A do not have index.html, but links to Page B does. If this is the case, don’t worry about it. Just be consistent in how you link to each individual page, meaning don’t use index.html in any links to Page A, but do use index.html whenever linking to Page B.

If you have different link popularity for each version: Consider a 301 redirect to the version with index.html, that way you consolidate all of your link popularity and remove any duplicate content.

————————-
Jessica Bowman is the Director of SEO for Business.com and an independent consultant. Her background includes managing nine websites, in four languages across North America and Europe, in the competitive travel industry. Most known for being an in-house search marketer, Jessica relishes in the human side of SEO – the art of getting things done within an organization, a challenge for most search marketers.

Comments are closed.

11 thoughts on “Should URLs in links use index.html?

  1. Something to note is that Google has gotten very good over the last year is managing 301 redirects – surprisingly they haven’t gotten any credit for doing the simple things right when MSN and Yahoo still can’t mange them anywhere near as well.

  2. Jessica –

    Great post and something I experienced first hand. In Google’s Webmaster Central (before introducing a 301 redirect), I saw that my “most popular page” fluctuated month to month from index.php to just the domain and then back again. A simple 301 redirect has made my highest ranking page stay the same for months now so consistency definitely does pay off in Google’s eyes.

  3. When linking to folders i think is amateur to require an index file. It is always important to make URL’s as easy as possible for people to use and type in. It is much easier to try to type site.com/folder than try to remember if it is

    site.com/folder/index.html
    site.com/folder/index.htm
    site.com/folder/index.asp
    site.com/folder/index.php
    site.com/folder/index.shtml
    etc…

    Dan – no all these urls are completely different, one of the reasons it is crucial to be consistent:
    XXX.buysportsvideogames.com
    http://www.XXX.buysportsvideogames.com
    buysportsvideogames.com/XXX.html
    http://www.buysportsvideogames.com/XXX.html

  4. Choice B is always bad.
    B. http://www.mysite.com/locations
    By leaving off the last slash, it makes your web server respond to queries with “you mean you want locations/, right?” and then your browser says “yes”. You hardly notice the delay but it is there and it is inefficient. Use that last slash!

  5. Also make sure, that the Google sitemap actually reflects the link structure whithout the index files. If it is generated automatically scan through it and search for locs which end with index.html, index.php etc.