Thread: trailing slash

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

    Join Date
    Mar 2017
    Posts
    5
    Rep Power
    0

    trailing slash


    Hello,

    What is the best method of dealing with the trailing slash issue?

    My site has html pages and a wordpress blog.

    The index page redirects to www.mysite.com, the html files have no slash but the blog has a slash. I can set the posts to have no slash but I can't see a way of stopping the parent /blog/ page from keeping the slash.

    What's the best thing to do? and does it matter? I have found articles that say you should pick one method and stay consistent but they all seem to be a few years old.

    I had planned to instate the slash for the homepage and leave the rest as it is but am I fixing something that isn't broken and creating confusion?
    Thanks
  2. #2
  3. Dinosaur
    SEO Chat High Scholar (3500 - 3999 posts)

    Join Date
    Jun 2011
    Location
    UK
    Posts
    3,983
    Rep Power
    6518
    I would doubt it has much bearing on things but the correct way is with the slash.
    To confirm this goto your home page in say chrome (google product) and copy the address, then paste it into something like notepad. Google always adds the slash so by follow googles example I would say to always add the slash. The same for Canonical tags
    Owner of Page Explorer the page onsite SEO checker
    Useful Tools: Site Statistics: SEM Rush | Site Crawler: Screaming Frog | Free SSL: Cloudflare
  4. #3
  5. No Profile Picture
    Newbie
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2017
    Posts
    5
    Rep Power
    0
    So I redirect to www. mysite.com/ put a self canonical tag to "http:// www. mysite.com/" and leave the .htm pages with no / and the wordpress blog pages keep the / is that correct?
  6. #4
  7. SeoRaptor
    SEO Chat Adventurer (500 - 999 posts)

    Join Date
    Mar 2016
    Location
    France, Saint-Etienne
    Posts
    994
    Rep Power
    1703
    Yes

    As long as the redirection are correct, the canonical tag are correct and the links match your sitemap you'll be fine. If you really want to remove the .html at the end of the url then you can do so using Apache .htaccess rewrie rules but that's not important for ranking.
    Owner of Bennetonable - "My opinions are my own - Feel free to disagree & think above the fold."
    Need a quick analysis > Free SEO grader Beta
  8. #5
  9. No Profile Picture
    Newbie
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Mar 2017
    Posts
    5
    Rep Power
    0
    Thanks to you both.

    I am trying to implement this. The entry in .htaccess is

    RewriteEngine On
    RewriteBase /

    RewriteCond %{HTTP_HOST} ^mysite.com [NC]
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
    RewriteRule ^index\.htm$ / [NC,R=301,L]

    I tried putting the slash in;

    RewriteCond %{HTTP_HOST} ^mysite.com/ [NC]
    RewriteRule ^(.*)$ http://www.mysite.com/$1 [L,R=301]
    RewriteRule ^index\.htm$ / [NC,R=301,L]

    But the slash is still missing. Even if I put it in manually it redirects back.

Similar Threads

  1. Replies: 9
    Last Post: Nov 11th, 2011, 08:07 AM
  2. 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
  3. Trailing slash issues
    By Phantomus in forum Search Engine Optimization
    Replies: 0
    Last Post: Sep 13th, 2010, 11:34 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