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

    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0

    Driving me Insane. Canonical issues


    Hi all, I have recently upgraded my website from http to https and everything seems to be indexing nicely. I have updates all internal links from
    http to https but I still have a problem

    My website that I have upgraded to is https://www.famestreet.com but I am still getting errors in Semrush

    I am getting 'duplicate content issues' being told that I have duplicate <title> tags for the following pages...

    https://www.famestreet.com and https://www.famestreet.com/

    The only difference is the '/' and I just dont know how to fix this. I only want the first version to be indexed. I dont want Google to index the following:

    http://famestreet.com
    https://famestreet.com
    www.famestreet.com
    https://www.famestreet.com/

    I only want https://www.famestreet.com to be indexed.

    How can I cure this whole 'duplicate content' issue.

    I have posted my .htacess file below if that helps

    Many thanks
    Terry

    RewriteEngine On

    ### START WWW & HTTPS

    # ensure www.
    RewriteCond %{HTTP_HOST} !^www\. [NC]
    RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    # ensure https
    RewriteCond %{HTTP:X-Forwarded-Proto} !https
    RewriteCond %{HTTPS} off
    RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    ### END WWW & HTTPS
  2. #2
  3. Super Moderator
    SEO Chat Skiller (1500 - 1999 posts)

    Join Date
    May 2015
    Location
    United Kingdom
    Posts
    1,598
    Rep Power
    2895
    Here's the interesting thing, they're correct. If you view https://www.famestreet.com in Chrome you'll see this:


    However if you view this in Edge:



    and Firefox:




    You'll see that Chrome and Firefox strip out the trailing slash however Edge does not. So if you want to be technically correct add the trailing slash at the end on the homepage. If you copy the url from Firefox/Chrome you'll see this: https://www.famestreet.com/ which includes the trailing slash.

    Comments on this post

    • KernelPanic agrees
    Always happy to help in private message. | Learn about my latest project Can You Get Automated Pages To Rank In Google?
    Useful Links: Useful SEO Tools | GTmetrix | FileOptimizer | Cloudflare
  4. #3
  5. No Profile Picture
    Moderator
    SEO Chat Scholar (3000 - 3499 posts)

    Join Date
    Sep 2016
    Location
    USA
    Posts
    3,013
    Rep Power
    3634
    Force all urls to have a trailing slash....
    Provided you are on a linux system, this code should fix your right up. Just make sure you don't create any chained redirects.

    Code:
    <IfModule mod_rewrite.c> 
    
    RewriteCond %{REQUEST_URI} /+[^\.]+$ 
    RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
    
    </IfModule>
  6. #4
  7. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0
    Hi, thanks for all the advice most helpful, im learning all the time.

    As i only have about 40 pages on my website that i need indexing, i have replace all references to https://www.famestreet.com to https://www.famestreet.com/ (with the trailing slash)

    All the other pages have .htm extentions and its only the hone page that is causing issues. Hopefully this will fiz the issue, thanks
    Last edited by KnowOneSpecial; Jul 19th, 2018 at 04:19 PM. Reason: Removed active links
  8. #5
  9. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Nov 2012
    Posts
    167
    Rep Power
    229
    I feel like this is a case of relying too much on tools. The issue with trailing slash does not apply to root URLs. The tool is wrong because it is likely configured to treat all URLs as non-root and applied the rules to the root URL when it shouldn't have.

    Ideally you should be consistent with your homepage URL (for esthetic purposes?). But even if you end up with trailing or without trailing slash, that doesn't pose any duplicate issue.

    Originally Posted by ezzoactor
    As i only have about 40 pages on my website that i need indexing, i have replace all references to https://www.famestreet.com to https://www.famestreet.com/ (with the trailing slash)
    You should not be doing this only because the tool said so. You could still end up with or without trailing slash unless you configure your site to display just one version.

    And supposed you configure your site to add a trailing slash at the end of all its URLs, that might complicate things when you get to your non-root URLs because they have file extensions (i.e. ending in ".htm"). They will still work but from a user point of view, do you really want your URLs to look like this:

    /register.html/
    /search-auditions.htm/
    /more/auditions-for-tv.htm/
  10. #6
  11. No Profile Picture
    Moderator
    SEO Chat Scholar (3000 - 3499 posts)

    Join Date
    Sep 2016
    Location
    USA
    Posts
    3,013
    Rep Power
    3634
    Actually there are many reason to add a trailing slash and hide url extensions like php, htm, html etc, etc.

    To make the URLs look cleaner
    To make URLs easier to type
    To make URLs easier to remember
    To make URLs more SEO keyword friendly

    Last But Definitely Not The Least

    To be able to change technologies -- If you ever want to move your site from one platform to another, its easier to do without users knowing if there are no extensions on the URLs

    It is quite a common practice.

    So using Sandy2012's example

    /register.html/
    /search-auditions.htm/
    /more/auditions-for-tv.htm/

    Properly adding the trailing slash and removing the extension gives this...
    This is in my opinion more SEO Friendly and easier to remember and type as well.

    /register/
    /search-auditions/
    /more/auditions-for-tv/

    Again, this is quite a common practice with CMS systems, especially WordPress.

    Edited to add...
    Here is a WordPress solution...
    Code:
    RewriteEngine on
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME}\.php -f
    RewriteRule ^(.+)/$ $1.php
    
    # Forces a trailing slash to be added
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/)$
    RewriteRule (.*)$ /$1/ [R=301,L]
    Last edited by KnowOneSpecial; Jul 19th, 2018 at 08:30 PM.
  12. #7
  13. No Profile Picture
    Contributing User
    SEO Chat Discoverer (100 - 499 posts)

    Join Date
    Nov 2012
    Posts
    167
    Rep Power
    229
    I would also recommend KnowOneSpecial's advice re the file extensions.

    However, I personally would not recommend forcing a trailing slash at the end of the URLs.

    Obviously if you enforce a trailing slash you would have to create a redirect for "without trailing slash" to "with trailing slash". One issue is that most people (or is it just me?) think of URLs as without a trailing slash. This means that if people keep accessing your pages using a "without trailing slash" URL, your server would need to keep redirecting them all the time. This would be a waste of resources and can have an effect on your website speed. But if you have a "without trailing slash" in the first place, then no redirection is needed (less processing).
  14. #8
  15. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2011
    Posts
    20
    Rep Power
    0
    Hi Guys, thanks for all the feedback,

    I didnt use any code or redirects to add the trailing slash. I physically went into each page and changed the link the home page (and ONLY the home page) from famestreet.com to famestreet.com/ as its only the homepage that the tools are giving a duplicate metatag error to

    As all the other pages end in .htm there was no need to touch any of these

    Doing this immediately fixed the error in Semrush

    Thanks
    Terry

Similar Threads

  1. canonical issues
    By qim in forum Search Engine Optimization
    Replies: 7
    Last Post: Mar 13th, 2014, 12:37 AM
  2. Canonical Issues in asp.net
    By Prof.stan in forum Google Optimization
    Replies: 5
    Last Post: Sep 5th, 2008, 12:27 AM
  3. Canonical Issues
    By ABS in forum Google Optimization
    Replies: 3
    Last Post: Apr 30th, 2007, 05:25 AM

IMN logo majestic logo threadwatch logo seochat tools logo