Trailing Slashes on Home Pages
-
I do not think I have a problem here, but a second opinion would be welcomed...
I have a site which has a the rel=canonical tag with the trailing slash displayed. ie www.example.com/
The sitemap has it without the trailing slash. www.example.com
Google has it's cached copy with the trailing slash but the browser displays it without.
I want to say it's perfectly fine (for the home page) as I tend to think they are treated (with/without trailing slashes) as the same canonical URL.
-
Totally agree, it's kind of a non issue, improve the canonical if you can but really, don't sweat it.
-
Oh yes, thanks for that. I've read that page a few times. :S
Apologies for the confusion Alex.
Don't have a crisis of confidence anyway! If there's a canonical 99 times out of 100 (probably more) I'm sure Google would get this right whether it's the homepage or not.
What server is the site hosted on Alex? Or are the URLs controlled by a CMS?
-
That is certainly my understanding - the homepage is a special case.
This pretty much details it in full:
-
Hi Alex
Ah, crisis of confidence again!
I didn't think that this was the case though for the index page. I thought normalisation meant they were treated as the same page. As Marcus said, I can't 301 the example.com page to example.com/ .
-
Hey,
in an ideal world, make sure it is has no trailing slash. But, as per the Google specific recommendations, make sure both resolve as a 200 OK rather than redirecting / to non /.
Think about it -
The browser removes the trailing slash. Also, go to any big site, Google, SEOMoz - the all have no slash. But.. check it in webbug and they resolve on both.
For me, having a trailing slash on the root or anywhere is just something else for folks to forget to add if they are linking or some such.
Here I would just remove the trailing slash in your canonical if you can just to be sure but the usual rules don't apply on the homepage and www.example.com & www.example.com/ are regarded as the same thing.
I have constant crisis of confidence - i often wonder if I am making it up as I go along or somewhere down the history of all the hundreds of SEO audits I have done I actually learned something along the way! I have actually googled something that I was unsure about and found my own blog post about it before. I think, much like Homer Simpson, every new thing I learn now pushes out an older thing!
Hope that helps!
Marcus -
Hi Marcus
I agree out outside of the home page it's an issue (& good answer btw) but it's only the index page I'm worried about.
It's that crisis of confidence that I'm sure we all get from time to time as to whether something rather simple/fundamental is actually as we believe it to be.
I've been re-reading this document http://tools.ietf.org/html/rfc3986 and I think it's section 3.2.6 (if I remember right) that covers normalization of the root URL's.
-
The two versions you speak of are treated as duplicate content. Ideally you should make sure the URL is the same everywhere, and 301 redirect to your preferred version. Are you sure the browser itself isn't removing the trailing slash? I know Chrome does on non-directory pages.
Saying that, if you have a canonical tag it shouldn't cause a massive problem, but it will help to do everything properly. Do everything you can to make sure all links under your control are the same version.
-
Hey Alex
There is a good overview of this here:
http://googlewebmastercentral.blogspot.co.uk/2010/04/to-slash-or-not-to-slash.html
Outside of the homepage, a slash url and a non slash URL are regarded as two seperate pages so are technically duplicates. Now, Google will generally deal with this but it is not optimal (which is what we are all about eh) so you should make a call and either go / or no / and then 301 the other version to the default.
The homepage should resolve on both and 200 for both and not redirect to the non slash. The browser will generally remove the slash on a root URL.
This is from the above link:
Rest assured that for your root URL specifically, http://example.com is equivalent to http://example.com/ and can’t be redirected even if you’re Chuck Norris.
If you are using a CMS there are usually plugins or configuration options to enforce a slash if that is your preferred option.
The big deal here is to
A - be consistent
B - 301 the alternative to the preferred for crawl optimisation and to ensure no daft duplication issues crop up.
Hope that helps!
Marcus
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Should search pages be indexed?
Hey guys, I've always believed that search pages should be no-indexed but now I'm wondering if there is an argument to index them? Appreciate any thoughts!
Technical SEO | | RebekahVP0 -
Does a no-indexed parent page impact its child pages?
If I have a page* in WordPress that is set as private and is no-indexed with Yoast, will that negatively affect the visibility of other pages that are set as children of that first page? *The context is that I want to organize some of the pages on a business's WordPress site into silos/directories. For example, if the business was a home remodeling company, it'd be convenient to keep all the pages about bathrooms, kitchens, additions, basements, etc. bundled together under a "services" parent page (/services/kitchens/, /services/bathrooms/, etc.). The thing is that the child pages will all be directly accessible from the menus, so there doesn't need to be anything on the parent /services/ page itself. Another such parent page/directory/category might be used to keep different photo gallery pages together (/galleries/kitchen-photos/, /galleries/bathroom-photos/, etc.). So again, would it be safe for pages like /services/kitchens/ and /galleries/addition-photos/ if the /services/ and /galleries/ pages (but not /galleries/* or anything like that) are no-indexed? Thanks!
Technical SEO | | BrianAlpert781 -
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect?
If I want clean up my URLs and take the "www.site.com/page.html" and make it "www.site.com/page" do I need a redirect? If this scenario requires a 301 redirect no matter what, I might as well update the URL to be a little more keyword rich for the page while I'm at it. However, since these pages are ranking well I'd rather not lose any authority in the process and keep the URL just stripped of the ".html" (if that's possible). Thanks for you help! [edited for formatting]
Technical SEO | | Booj0 -
Duplicate Pages , Do they matter ?
I have been told buy the company who created my site that duplicate page warning are not a problem ? my site is small and only has 50 pages ( including product pages etc ) yet the crawl shows over 6500 duplicate pages am I right to be concerned?
Technical SEO | | Gardening4you0 -
How to redirect home.co.uk to home.co.uk/
Hi, We recently moved to shopify and noticed that our home page is now .co.uk/ (with backslash) instead of .co.uk As both are returning 200 ok I am concerned that this could cause a duplicate content issue. Could anyone please advice on the best way to fix this? Thanks, Paul
Technical SEO | | devoted2vintage0 -
Duplicate Content - Home Page even wth Mod Rewrite 301
Hi, It looks like Seomoz (and Screaming Frog) is showing my home page as duplicate content. http://www.mydomain.com Page Authority 61 Linking root Domain 321 http://www.mydomain.com/ Page Authority 61 Linking root Domain 321 [Screaming Frog shows duplicate as]
Technical SEO | | Force7
www.mydomain.com/
www.mydomain.com/index.html} Years ago I hired someone to write the code for a rewrite for non www to be 301 redirected to www version. I was surprised at finding out that I still have a problem. Here is the code on my htaccess page. <ifmodule mod_rewrite.c="">RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.mydomain.com [NC]
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]</ifmodule> Was this code not properly written ? One more question, we were hit hard by Panda and Penguin, would something like this be that much of a factor. Thanks in advance, Force70 -
How to force a trailing slash after the domain name
My campaign analysis is predictably listing domain.com and domain.com/ as repeated content. I've searched and searched but cannot find a way to force a trailing slash on the end of the domain name unless there's a file or directory after it.. Is there a way to accomplish this using .htaccess
Technical SEO | | JollyBoy0 -
Consolidate page strength
Hi, Our site has a fair amount of related/similiar content that has been historically placed on seperate pages. Unfortuantely this spreads out our page strength across multiple pages. We are looking to combine this content onto one page so that our page strength will be focused in one location (optimized for search). The content is extensive so placing it all on one page isn't ideal from a user experience (better to separate it out). We are looking into different approaches one main "tabbed" page with query string params to seperate the seperate pages. We'll use an AJAX driven design, but for non js browsers, we'll gracefully degrade to separate pages with querystring params. www.xxx.com/content/?pg=1 www.xxx.com/content/?pg=2 www.xxx.com/content/?pg=3 We'd then rel canonical all three pages to just be www.xxx.com/content/ Same concept but useAJAX crawlable hash tag design (!#). Load everything onto one page, but the page could get quite large so latency will increase. I don't think from an SEO perspective there is much difference between options 1 & 2. We'll mostly be relying on Google using the rel canonical tag. Have others dealt with this issue were you have lots of similiar content. From a UX perspective you want to separate/classifiy it, but from an SEO perspective want to consolidate? It really is very similiar content so using a rel canonical makes sense. What have others done? Thoughts?
Technical SEO | | NicB10