Question of slash and withoust slash

Discussion in 'Search Engine Optimization' started by iloveRP.com, Jun 26, 2010.

  1. #1
    iloveRP.com, Jun 26, 2010 IP
    sarahk likes this.
  2. social-media

    social-media Member

    Messages:
    311
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    35
    #2
    I always use a trailing slash when linking to my home page... or when linking to any other folder on the site that contains a default document like (index.html or default.asp or index.php). Why?

    It's part of my URL canonicalization policy. Search engines typically see:

    http://www.example.com/folder
    http://www.example.com/folder/
    http://www.example.com/folder/index.html

    as three separate pages even though they render the exact same HTML. If you allow your pages to be referenced using multiple URLs, the URL canonicalization issues will lead to duplicate content and split PageRank/link juice.

    The solution is to set a policy for how to deal with all the variations of URLs for rendering each page on your site. So you need to decide which of those 3 versions of your page is your canonical or prefered URL. All non-canonical URLs that can be used to render that same page should be 301 redirected to the canoncial URL.

    My URL canonicalization policy says that I ALWAYS show a trailing slash when referencing a folder that has a default document in it but hide the default document name. In the above example my policy dictates that http://www.example.com/folder/ is that canonicial URL so the others will get 301 redirected.

    Since my web root is also a folder that has a default document to render my home page, I always include the trailing slash. It's my canonical home page URL.
     
    social-media, Jun 26, 2010 IP
    sarahk likes this.
  3. HansonBro

    HansonBro Peon

    Messages:
    59
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I agree with the above, I too prefer / but its more a matter of taste than 'the right thing to do'. The important thing is to be consistent, whichever you pick - stick with it. Cheers.
     
    HansonBro, Jun 27, 2010 IP