May 28, 2005

SEO Quiz - Part 1: URLs

Inspired by Rand’s SEOmoz Quiz, I thought I would start a new series here called SEO Quiz. The goal here is to ask some questions about search engine optimization and generate some discussion about favored methods.

Hopefully, these questions and answers will become useful bits of information for SEOs. Every week I’ll post a new question and leave it up for comments throughout the week. At the end of the week, I’ll pull out the most notable comments and summarize what people thought were the best practices. Of course I will add in my thoughts as well.

So lets start off with the first question.

Q: When linking to the homepage from an internal page, which of the following URLs is the best choice?

  • A: /
  • B: http://www.mydomain.com
  • C: http://www.mydomain.com/
  • D: http://www.mydomain.com/index.html

Michael Nguyen | SEO Quiz | Comments (16)

16 Responses to “SEO Quiz - Part 1: URLs”

  1. Razvan Antonescu Says:

    Will it be:

    http://www.mydomain.com/ ? :P

  2. Mick Says:

    Preferably

    B: http://www.mydomain.com

    or

    C: http://www.mydomain.com/

    Do not use D - index.html unless you are forced to becausae of circumstances beyond your control

    D: http://www.mydomain.com/index.html

    although acceptable:

    A: /

    A could cause problems if your links are inconsistent or somebody else links to you without the http://www.

    B or C is the way to go to protect yourself and keep your site being indexed to one specific address - with or without the www

  3. rob Says:

    I agree with Mick.

    B or C is the way to go.

    From a code bloat view, I think in the days of 14k dial up connections I might have presented an argument against using absolute urls, but in these days of 302 hell, this is no longer the case.

  4. Hunox Says:

    I usually link as “/” but you bring up some good points. I think I will start linking to a full URL.

  5. Spanky Says:

    B or C is just fine the “/” is nice cause it just closes out the code. :)

  6. Matthom Says:

    I usually use A, as well.

    Although this habit causes problems with feed readers - when pulling in my RSS feeds.

    I’d be interested in knowing which way is best.

  7. Michael Nguyen Says:

    Great answers so far everyone - I’ll be posting the answer and a summary at the end of the week.

    In the meanwhile, try and get others to come and give their answers. I’d like to see what other SEOs are doing.

  8. randfish Says:

    My vote is for B or C. I don’t think it would make too much of a difference between the two.

    I do occassionally like relative links (like to index.html), because this makes a site portable, but for link popularity, it’s much better to point to the direct URL.

  9. PhilC Says:

    B is not a good choice because Apache servers need the trailing slash, and the way they get round it is to ask the requestor to request again but with the trailing slash added - a redirect to the proper URL. It may not be universal among Apache servers, and it may even be out of date, but as long as some servers do it that way, B isn’t the best choice.

    It’s interesting that Google’s brand new Sitemap system needs the trailing slash in the URLs, so the redirect may be very common.

    I’ll go for C on its own.

  10. hink Says:

    The trailing slash has always been universal to me, just as, conversely, omitting it is for server paths.

    This is one of those things you learn, you have no idea where you learned it, and you are glad you happened to learn the right way. :)

  11. Chris_D Says:

    C.

  12. Arun Agrawal Says:

    It’s option C –

    http://www.example.com/

    Whenever you are accessing the default document in a directory, Google prefers a trailing slash.

    Arun

  13. Dave Vogt Says:

    I link to myself on my site the same way I’d like to be linked to; with trailing slashes.

    I suppose it’s mostly habit born out of working with directories. I wouldn’t link to http://www.example.com/about when I want http://www.example.com/about/.

  14. DJ Says:

    I already know I will have the least popular answer, but I believe I can make a few points for justifying the reason’s for my answer.
    I would use D: http://www.mydomain.com/index.html to insure portability. Also, to increase the potential of as many browser platforms, which sometimes have hiccups when rendering relative URLs.
    In addition of the Apache server “/” problem mentioned above, doesn’t Apache server require index/home pages to be titled default.htm? If so, in order to make the site portable and usable on various server platforms, the absolute URL would be the way to go.

    Are there any issues with search engine algorithms in the way they would index absolute vs. relative URLs? I look forward to any comments, as I’m still relatively (no pun intended!) new to SEO and wish to learn more.

    Thanks, DJ

  15. Pankaj Says:

    I think D option is the best one, coz every site has a default page to load when a site’s URL is accessed as in other cases the browser will look for the home page of that site and then move on to it…..
    when writing index.html after the URL of site…we are directing browser to that page directly and hence it will be faster to access…
    What do you guys think about this..??

  16. file tax Says:

    where is the pefect answer for your question?
    my answer is http://www.mydomain.com/

Leave a Reply