Should URLs in links use index.html?

SMS Text

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.

Get the latest news from Search Engine Journal!
We value your privacy! See our policy here.
  • http://seohotline.com Ahmed Bilal

    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.

  • http://www.hagrin.com/index.php Hagrin

    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.

  • http://technospot.net/blogs Ashish Mohta

    Thats really good points.I had been wondering if i post a page in two categories how it will be listed on google

  • http://www.buysportsvideogames.com Dan

    How about subdomains..

    like

    XXX.buysportsvideogames.com

    vs

    buysportsvideogames.com/XXX.html?

    It thinks that it is a sub, right?

  • http://www.netpaths.net Cvos SEO

    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

  • http://pornborg.org/ Joey

    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!

  • http://blog.welldesignedurls.org/ Mike Schinkel

    I’m so glad to see this article; discussions of this type are so needed!

    I started “The Well Designed URLs Initiative” with a goal to discuss and then publish patterns and best practices. Currently I am running URLQuiz #1: To .WWW or not to .WWW?

    Please visit and give you opinion at: http://blog.welldesignedurls.org/2007/02/19/urlquiz-1-www-or-non-www

  • http://www.freetube.us.tc Joost

    i gues they’re referring to consistency in your own urls? But I don’t see how it could really matter or hurt your own links.

  • http://www.askapache.com/2006/htaccess/htaccesselite-ultimate-htaccess-article.html Jackie O

    According to http://www.askapache.com/2006/htaccess/htaccesselite-ultimate-htaccess-article.html you should remove index.html for stuff like http://www.askapache.com/ and instead use DirectoryIndex index.html

  • http://www.ezbusinessneeds.com SEO Web Design

    Be consistent. This is not really a problem as long as you maintain the same version of url address whenever you are linking in.

  • http://www.infosecprojects.net/ Linux Admin

    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.