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
-
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 -
Home page duplicate content...
Hello all! I've just downloaded my first Moz crawl CSV and I noticed that the home page appears twice - one with an appending forward slash at the end: http://www.example.com
Technical SEO | | LiamMcArthur
http://www.example.com/ For any of my product and category pages that encounter this problem - it's automatically resolved with a canonical tag. Should I create the same canonical tag for my home page? rel="canonical" href="http://www.example.com" />0 -
Switchboard Tags - Multiple desktop pages pointing to one mobile page
I have recently started to implement switchboard tags to connect our mobile and desktop pages, and to ensure that our mobile pages show up in rankings for mobile users. Because our desktop site is much deeper in content than our mobile site, there are a number of desktop pages we would like to have point to one mobile page. However, with the switchboard tags, this poses a problem because it requires multiple rel=canonical tags to be placed on the one mobile page. I'm assuming this will either confuse the search engines, or they will choose to ignore the rel=canonical tag altogether. Any ideas on how to approach this situation other than creating an equivalent mobile version of every desktop page or implementing a user agent detection redirect?
Technical SEO | | JBlank0 -
Two Domains for the Same Page
We are creating a website for a client that will have hundreds of geographically driven landing pages. These pages will all have a similar domain structure. For example www.domain.com/georgia-atlanta-fastfood-121 We want the domain to be SEO friendly, however it also needs to be print friendly for a business card. (ex www.domain.com/121) The client has requested that we have two domains for each page. One for the Search Engines and then another shorter one for print/advertising purposes. If we do that will search engines the site for duplicate content? I really appreciate any recommendations. Thanks! Anna
Technical SEO | | TracSoft0 -
Issues with trailing slash url
Recently, we have changed our website to www.example.com/super-rentals/ (example) and we have done a 301 redirection to the new urls from the old one. We have noticed in Google webmaster tool that urls without trailing slash as 404 error. www.example.com/super-rentals. Please let us know how to fix this issue as soon as possible. Note: Our previous urls are not the urls without trailing slash. It is a different url (www.example.com/super-rentals.htm) we have rewritten in to www.example.com/super-rentals/ only. I would like to know why GWT pulls out the urls without trailing slash and shows in 404 error. Thanks for your time
Technical SEO | | massimobrogi0 -
When Is It Good To Redirect Pages on Your Site to Another Page?
Suppose you have a page on your site that discusses a topic that is similar to another page but targets a different keyword phrase. The page has medium quality content, no inbound links, and the attracts little traffic. Should you 301 redirect the page to a stronger page?
Technical SEO | | ProjectLabs1 -
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 -
Page load speed?
Hi everyone, hope you've all had a good new years celebration. Just a quick one on page load speed? how important do you think it is to organic rankings, especially on competitive terms? Any tips on improving it? do i need to improve just the landing page im trying to rank or every page as its looked at as a qualtiy score as a whole? Kind Regards,
Technical SEO | | pauledwards0