Submit Your Article Forum Rules

Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Google Report Card: Trailing Slashes in URL

  1. #1
    Senior Member
    Join Date
    Mar 2008
    Posts
    754

    Google Report Card: Trailing Slashes in URL

    There are a lot of topics we could talk about in regard to the Google Report Card (see post by Morestar - but I was a little overwhelmed by nearly ten pages of the report focused on canonical URL formats. And in particular, the trailing slash issue.

    Can anyone with a little more experience help summarize what Google is saying here? I'm confused about how I should link to a home page:

    widget.com
    widget.com/
    widget.com/index.htm

    Here's where you can download the PDF Google Report Card
    Do the best you can - as fast as you can - then fix it later.
    --Seth Godin

  2. #2
    WebProWorld MVP wige's Avatar
    Join Date
    Jun 2006
    Posts
    3,138

    Re: Google Report Card: Trailing Slashes in URL

    This is something I have seen a lot: "widget.com" vs "widget.com/" The debate started with a comparison of URLs that Matt Cutts did a few years ago, but it was actually a typo. To a search engine, a spider, and a web browser, those two URLs are identical. At the most basic level, a trailing slash at the end of the domain name is required. If it is not present, the search engine, spider or browser will add it. This is because at the most basic level, a URL must contain two elements, a hostname and a file path. In this case, "widget.com" is the hostname, and "/" is the file path. If you leave out the file path, the client has to assume it is "/" (also called "root").

    The issue is really the canonicalization between "widget.com/", "widget.com/index.htm", "www.widget.com/", and "www.widget.com/index.htm". In this case, you need to choose which of the four variants you prefer, and redirect the other three forms to that preferred one.

    As for the trailing slash, the issue being explored in the Report Card is not trailing slashes after the domain name. They are referring to how trailing slashes for the folder roots deeper in the site are handled.
    The best way to learn anything, is to question everything.
    WigeDev - Freelance web and software development

  3. #3
    Senior Member
    Join Date
    Mar 2008
    Posts
    754

    Re: Google Report Card: Trailing Slashes in URL

    Thanks, wige...you're right. Google is talking about slashes following a folder name (not the domain). Here's their example:

    google.com/finance
    google.com/finance/

    I guess the idea is that you should use one convention or the other - but not both (or at least use the proper redirects). Right?

    Quote from Google Report:
    The bad news is that each of these URLs will get crawled and indexed by search engines, creating duplicate content. Search engines will have a tougher time deciding which URL is the canonical. Also, each URL will have its own reputation.
    Using a 301 on google.com/products/ will consolidate this valuable reputation so that the canonical can rank to its fullest.
    Do the best you can - as fast as you can - then fix it later.
    --Seth Godin

  4. #4
    WebProWorld MVP danlefree's Avatar
    Join Date
    Jun 2005
    Posts
    414

    Re: Google Report Card: Trailing Slashes in URL

    Quote Originally Posted by keyon View Post
    I guess the idea is that you should use one convention or the other - but not both (or at least use the proper redirects). Right?
    Ideally, you'll be hiding the implementation of your site (i.e. "index.htm") from your visitors and including only relevant keywords in the URL string - given the option, I would recommend that you eliminate trailing slashes and redirect to the canonical URL (i.e. "site.com/folder/item") when someone visits the URL with a trailing slash (i.e. "site.com/folder/item/").

    This practice is mentioned on page 24 of the Google SEO report card with the following comments:

    Nice! - These URLs route both visitors and search engines to the canonical URL, preventing 404s
    and consolidating reputation.
    Whichever method you decide to implement (pick the one that's easiest for you) you should use it uniformly, use it with the rel=canonical tag, and gracefully handle user error where possible.
    Dan LeFree | Owner/Operator (Web development, marketing)

  5. #5
    WebProWorld MVP Clint1's Avatar
    Join Date
    Jun 2003
    Location
    Sitting down in a chair
    Posts
    2,585

    Re: Google Report Card: Trailing Slashes in URL

    Quote Originally Posted by keyon View Post
    There are a lot of topics we could talk about in regard to the Google Report Card (see post by Morestar - but I was a little overwhelmed by nearly ten pages of the report focused on canonical URL formats. And in particular, the trailing slash issue.

    Can anyone with a little more experience help summarize what Google is saying here? I'm confused about how I should link to a home page:

    widget.com
    widget.com/
    widget.com/index.htm

    Here's where you can download the PDF Google Report Card
    If you'll notice, just about anywhere where you submit a URL and the page gives you an example, they almost always show the example with a slash on the end. Two that come to mind are G and MSN.

    The G submit page:

    "Please enter your full URL, including the http:// prefix. For example: http://www. google.com/."


    MSN:

    "Type the URL of your homepage
    MSNBot follows links from your homepage to find other pages on your site.

    Example: http://www. example.com/."


    That should tell you something, and the reason why I use it for internal links or when I put my links elsewhere. But I see Y has removed it from their submit page but they did have their example with the slash on the end.

    I looked into this some more, and (as far as submit forms go) it could be due to the kind of coding the submit form is using, because this page specifically says do not use the slash:

    "(Site eg : submityoursite.com , Page eg : twitter.com/submityoursite , no trailing /)"

    I would just do whatever a submit form suggests, if any. If it does not give an example, personally I would be more inclined to use the slash. Reason is, a few years back I read (just going from memory) something like, "....the slash informs [or lets the SE's or bots know?]...."....to continue to spider beyond that URL....that there are other pages beyond....". Again, that's just going from memory and is not verbatim nor an exact quote. FAIK that could be old news and no longer the case.

    Also if you notice, any time you enter any root URL into your browser address bar ("whatever.com"), and go to the site, the destination webpage always adds the slash on the end which appears in the resultant address bar. (1)

    For your own links at your own site, it probably doesn't matter. I used to use just "/" for the links back to my homepage, but I started using the full URL and with the slash on the end.

    As for your examples, the only one you should really be concerned with not using (as Wige hit on), is widget.com/index.htm since SE's treat the other two the same (see "(1)" above; resultant URL always has the slash). I even had to create a 301 redirect from that URL to mydomain.com since G insisted on hitting the /index.html version of the page and I didn't want it to think they were dupe content. (I also have a site-wide www 301 redirect which you should also decide if that's the prefix you want to use, most do).
    God Bless,
    -Clint
    (Join Date: 2003)

  6. #6
    WebProWorld MVP kgun's Avatar
    Join Date
    May 2005
    Location
    Norway
    Posts
    7,999

    Re: Google Report Card: Trailing Slashes in URL

    Side note:

    What does a .htaccess rules like this


    RewriteRule ^(\w+)/?$ index.php


    do?

  7. #7
    WebProWorld MVP deepsand's Avatar
    Join Date
    May 2004
    Location
    State College, PA
    Posts
    16,443

    Re: Google Report Card: Trailing Slashes in URL

    What are the RewriteConds?

  8. #8
    WebProWorld MVP kgun's Avatar
    Join Date
    May 2005
    Location
    Norway
    Posts
    7,999

    Re: Google Report Card: Trailing Slashes in URL

    Quote Originally Posted by deepsand View Post
    What are the RewriteConds?
    Do you mean flags?

    Not needed here.

  9. #9
    WebProWorld MVP deepsand's Avatar
    Join Date
    May 2004
    Location
    State College, PA
    Posts
    16,443

    Re: Google Report Card: Trailing Slashes in URL

    Not flags, but the Conditions that the Rule tests.

  10. #10
    Senior Member Uncle Dog's Avatar
    Join Date
    Apr 2008
    Posts
    342

    Re: Google Report Card: Trailing Slashes in URL

    Quote Originally Posted by kgun View Post
    Side note:

    What does a .htaccess rules like this


    RewriteRule ^(\w+)/?$ index.php


    do?
    Doesn't need a RewriteCond... so this rule replaces the entire address (after the domain) with index.php.

    It's obviously not complete as the brackets indicate an attempt to copy something from the first address for use in the rewritten one.

Page 1 of 3 123 LastLast

Similar Threads

  1. Are slashes in url bad ?
    By Riklaunim in forum Search Engine Optimization Forum
    Replies: 4
    Last Post: 01-06-2007, 07:18 AM
  2. Double Trailing slash mark getting indexed
    By wmrobwl in forum Google Discussion Forum
    Replies: 1
    Last Post: 04-19-2006, 07:50 PM
  3. Trailing AS?
    By Nage in forum Flash Discussion Forum
    Replies: 0
    Last Post: 08-03-2004, 01:10 PM

Posting Permissions

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