SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    runat="server" Golgotha's Avatar
    Join Date
    Nov 2001
    Location
    Colorado
    Posts
    2,085
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    relative vs. absolute links - the final answer

    the "relative vs. absolute links" question comes up here and everywhere else way too often to count so here is the answer you all need,from GoogleGuy.

    Sometimes a tangent isn't such a bad thing though. For example, partway into the Bourbon discussion, wattsnew asked if there was a technical guide on how to handle www vs. non-www, relative vs. absolute linking, and links to different pages such as / vs. index.html vs. default.asp. My rule of thumb is to pick a root page and be as consistent as possible. I lean toward choosing http://www.yourdomain.com/ but that's just me; http://yourdomain.com/ would work as well. Then I recommend that you make things as simple as possible for spiders. I recommend absolute links instead of relative links, because there's less chance for a spider (not just Google, but any spider) to get confused. In the same fashion, I would try to be consistent on your internal linking. Once you've picked a root page and decided on www vs. non-www, make sure that all your links follow the same convention and point to the root page that you picked. Also, I would use a 301 redirect or rewrite so that your root page doesn't appear twice. For example, if you select http://www.yourdomain.com/ as your root page, then if a spider tries to fetch http://yourdomain.com/ (without the www), your web server should do a permanent (301) redirect to your root page at http://www.yourdomain.com/
    So the high-order bits to bear in mind are
    - make it as easy as possible for search engines and spiders; save calculation by giving absolute instead of relative links.
    - be consistent. Make a decision on www vs. non-www and follow the same convention consistently for all the links on your site. Use permanent redirects to keep spiders fetching the correct page.


    Those rules of thumb will serve you well no matter what with every search engine, not just with Google. Of course, the vast majority of the time a search engine will handle a situation correctly, but anything that you can do to reduce the chance of a problem is a good idea. If you don't see any problems with your existing site, I wouldn't bother going back and changing or rewriting links. But it's something good to bear in mind when making new sites, for example.
    from the thread here: http://www.webmasterworld.com/forum30/29720-1-30.htm

  2. #2
    I am obstructing justice. bronze trophy fatnewt's Avatar
    Join Date
    Jul 2002
    Location
    Ottawa, Canada
    Posts
    1,766
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No suprises there, but that's a very clear explanation.
    Colin Temple [twitter: @cailean]
    Web Analyst at Napkyn


  3. #3
    Serial Publisher silver trophy aspen's Avatar
    Join Date
    Aug 1999
    Location
    East Lansing, MI USA
    Posts
    12,937
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    he's said that before
    Chris Beasley - I publish content and ecommerce sites.
    Featured Article: Free Comprehensive SEO Guide
    My Guide to Building a Successful Website
    My Blog|My Webmaster Forums


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •