SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Addict Scott Blanchard's Avatar
    Join Date
    Sep 2010
    Posts
    314
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Should home page canonical URL have a trailing slash or not?

    For the home page's canonical URL...

    <link rel="canonical" href="http://mysite.com" />

    OR

    <link rel="canonical" href="http://mysite.com/" />

    AND

    Where should it be placed within the head section? at the top, somewhere in the middle, or last?

  2. #2
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,820
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    It shouldn't matter where you put that in the head.

    The only difference between with and without the slash is that the one without redirects automatically to the one with so if you include the slash you get rid of the redirect. That only applies in actual links though and not in the canonical tag where they are both exactly equal.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


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
  •