#1
  1. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2

    Trailing Backslash ( / ) on my site URL


    Is there a difference if I include or exclude the trailing backslash in my site's URL in the canonical tag?

    For example:

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

    OR

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

    What are the implications in using one over the other?

    Thanks
  2. #2
  3. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Dec 2015
    Posts
    21
    Rep Power
    0
    There is an answer on stackexchange that explains this in detail -
    seo - Canonical URL for a home page and trailing slashes - Webmasters Stack Exchange

    For root domain urls, like Example Domain
    It does not matter whether you have a trailing slash or not. They are equivalent and browsers are supposed to treat them same.

    However for path urls like http://www.example.com/abc/cde
    The trailing slash makes a difference and you should use either one of them.

    Comments on this post

    • Ann Smarty agrees : Thanks for searching for the answer!
  4. #3
  5. My views are my own ;)
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Jun 2012
    Location
    Clifton Park, New York
    Posts
    1,182
    Rep Power
    1550
    Long time ago I did this article on a trailing slash which I think makes the whole issue much clearer
    https://www.searchenginejournal.com/...-matter/13021/

    The bottom line is, it doesn't matter in most cases but it may cause errors with some web servers... In your case, I'd go with /
    Everything will be ok in the end

    If it's not ok, it's not the end
  6. #4
  7. No Profile Picture
    Newbie

    Join Date
    Jan 2016
    Posts
    2
    Rep Power
    0
    Yes, it matters. A URL with a trailing slash is considered different than the URL without the trailing slash ... even if they are the same page. This is the type of unintentional duplicate content problem you are looking to avoid by using the rel="canonical" tag.

    You should decide which of the two types you want: with or without trailing slashes and then set your canonical tag to that type.

    If you are stuck deciding which of the two to choose, I would suggest don't agonize over it. It's not that big a deal which you choose. Just be consistent throughout your site and be sure that all of your links point to the canonical versions.

    Personally, I prefer the version of URLs that end with trailing slashes. I remember reading somewhere that a trailing slash at the end of a URL was like the period at the end of a sentence. That analogy resonated well with me.
  8. #5
  9. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2
    Great link. Thanks
  10. #6
  11. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2
    Originally Posted by Ann Smarty
    Long time ago I did this article on a trailing slash which I think makes the whole issue much clearer
    https://www.searchenginejournal.com/...-matter/13021/

    The bottom line is, it doesn't matter in most cases but it may cause errors with some web servers... In your case, I'd go with /
    Ann, in your article, are you referring specificly to path URLs as opposed to Root Domain URLs as pointed out by SilverMoon?
  12. #7
  13. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2
    Originally Posted by AsianBrain
    Yes, it matters. A URL with a trailing slash is considered different than the URL without the trailing slash ... even if they are the same page. This is the type of unintentional duplicate content problem you are looking to avoid by using the rel="canonical" tag.

    You should decide which of the two types you want: with or without trailing slashes and then set your canonical tag to that type.

    If you are stuck deciding which of the two to choose, I would suggest don't agonize over it. It's not that big a deal which you choose. Just be consistent throughout your site and be sure that all of your links point to the canonical versions.

    Personally, I prefer the version of URLs that end with trailing slashes. I remember reading somewhere that a trailing slash at the end of a URL was like the period at the end of a sentence. That analogy resonated well with me.
    I have the following html code on all my pages for the link to the homepage:

    <li class="active"><a href="/"><i>Home</i></a></li>

    Since I am using the "/" ( Relative ) method of linking to my homepage, then does it make sense use the href="http://mysite.com/" ( Using the trailing backslash ) in my canonical? Based on the above posts, it seems that it may not matter, but I will change it so that it is consistent across the board.
  14. #8
  15. No Profile Picture
    Contributing User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Sep 2015
    Posts
    58
    Rep Power
    2
    In addition, when I copy the URL form a web browser, and then paste it say in notepad or something, the pasted URL has the / at the end of the URL. But when looking at the URL in the web browser, it does not have the / at the end.
  16. #9
  17. My views are my own ;)
    SEO Chat Good Citizen (1000 - 1499 posts)

    Join Date
    Jun 2012
    Location
    Clifton Park, New York
    Posts
    1,182
    Rep Power
    1550
    Originally Posted by BrownBag
    Ann, in your article, are you referring specifically to path URLs as opposed to Root Domain URLs as pointed out by SilverMoon?
    It's the full path but, unless you do what you did in your example, the point is the same

    There's no "root domain" in canonicals: You can only point a canonical to a path...

Similar Threads

  1. Replies: 9
    Last Post: Nov 11th, 2011, 08:07 AM
  2. Trailing slashes have me befuddled
    By Vcize in forum Google Optimization
    Replies: 8
    Last Post: Jan 20th, 2011, 03:53 AM
  3. Trailing slash at end of url
    By Hilary in forum Web Design, Coding and Programming
    Replies: 3
    Last Post: Oct 5th, 2010, 11:48 AM
  4. The trailing slash
    By Robin Hood in forum Google Optimization
    Replies: 3
    Last Post: May 8th, 2008, 03:05 PM
  5. Site Map - Use trailing slash?
    By eferg in forum Google Optimization
    Replies: 7
    Last Post: Sep 23rd, 2005, 01:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo