Trailing Slashes on URLs
-
Hi everyone
I have a question on trailing slashes in URL.
The crux of it is this:
is having both: example.com/subdirectory/ and: example.com/subdirectory on all of your subdirectories considered duplicate content by Google - or in some other way really bad?
We have done a heck a lot of research into this, and it would seem...no one knows for sure (it is easy to get lost in a sea of Webmaster tool forums from 2012). Google itself has both URLs for it's subdirectories (try https://www.google.co.uk/maps and https://www.google.co.uk/maps/) as does Moz; and yet there are some rumblings on the internet of people who think you must put a 'redirect' (although not really a redirect as it isn't a 301) in your htaccess file to one or the other (so for example.com/subdirectory/ would 'forward' to example.com/subdirectory); and this is what bbc.co.uk do.
We tried putting this htaccess 'forward' in as an experiment, but I noticed our site then stopped being fully crawled by Google bot, so we reversed it.
Can any one shed any light?
-
Hi there.
There is the rule: do not show google duplicate content. So, having both, with and without the trailing slashes is an issue.
If you dont want or think is not necessary a redirect... you can set a canonical. As you said, moz doesnt have a redirect, instead has a canonical.Check it out: view-source:https://moz.com/community/q/
Hope it helps.
GR.
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
-
Can you help by advising how to stop a URL from referring to another URL on my website with a 404 errorplease?
How to stop a URL from referring to another URL on my site. I'm getting a 404 error on a referred URL which is (https://webwritinglab.com/know-exactly-what-your-ideal-clients-want-in-8-easy-steps/[null id=43484])referred from URL (https://webwritinglab.com/know-exactly-what-your-ideal-clients-want-in-8-easy-steps/) The referred URL is the URL page that I want and I do not need it redirecting to the other URL as that's presenting a 404 error. I have tried saving the permalink in WordPress and recreated the .htaccess file and the problem is still there. Can you advise how to fix this please? Is it a case of removing the redirect? Is this advisable and how do I do that please? Thanks
Technical SEO | | Nichole.wynter20200 -
Localizing URLs Path - Hreflang
Hello, This is a simple question regarding how URLs should be managed for proper results with the hreflang tags. Right now, we have a website in English and German. The hreflang tag is working properly. This is how we currently have it: https://www.memoq.com/ https://de.memoq.com/ But we will soon change the way we localize our web, moving out of the sub-domain structure. There is this possibility of localizing the URLs path, but I was wondering if the hreflang tag would work in such case. The new structure would look something like: https://www.memoq.com/why-memoq https://www.memoq.com/de/warum-memoQ So my question is: If we localize the keyword in the path of the URL, will the tag still work? Or do they need to be in the same language than the English version. Thanks!
Technical SEO | | Kilgray1 -
Preserving Social Shares Through URL Changes
We are making significant URL changes to our website. Because the URL is changing the social sharing buttons are not showing previous shared counts. I have read several resources like the one below that is linked to in several other similar questions. http://searchenginewatch.com/article/2172926/How-to-Maintain-Social-Shares-After-a-Site-Migration However I would love to get some insight from someone who has done this and there thoughts on the outcome. As an ecommerce site the "Social Proof" of products that have received social shares is a big deal to us. In Mike Kings example above the counts are being attributed to the OLD URL which is problematic over time. Our site has been up for over 12 years and has had several major changes to it, and I am certain there will be more in the future, being able to preserve the count on the current URL is ideal. While I agree with him that over time I believe social platforms will let data pass through 301 redirects, until then I need to find the best way to do this. Also with his example and others I have seen people mention than new likes from the new url can reset the counter. If you have gone through this and have ideas pleas share them. I look forward to your thoughts thanks.
Technical SEO | | RMATVMC1 -
What are the SEO implications of URLs that use a # in them?
I have several clients who have begun to ask questions about sites that are designed to look like a single page. When you click on a link, the URL changes but it uses a # before (i.e. http://www.kelloggs.com/teamusa**/#**/teamusa/athletes/kerri-walsh.html. What are the SEO implications of having a page set up this way? I noticed that Google has indexed this page but the indexed URL does not include a #. Is Google indexing a separate version of this page? Any insights would be really helpful! Thanks
Technical SEO | | VMLYRDiscoverability0 -
What is your opinion on ideal url structure?
Which url structure do you think is better... website.com/CO/denver/555-your-address-way-denver-co-55678/98347578 or website.com/classifying-keyword/555_your_address_way-denver_colorado-55678-98347578 orrr website.com/classifying-keyword/555-your-address-way-denver-colorado-55678-98347578
Technical SEO | | jessefriedman0 -
MozBar picking up iFrame source as URL
Running a WordPress site with a custom theme. Using a standard wp_head or wp_footer hook to insert the standard code for a Facebook Like, Twitter count / Google Plus count into the site - basically that hook just places the code, programmatically, into the HEAD (where applicable) or right before the BODY closes. For some reason, MozBar is picking up the URL of the iFrame that gets inserted with this code as the URL of the site. I don't have it live right now due to the issues, but I can turn it "on" for anyone who wants a look. Anyone else have this issue? I'm using the code directly from developers.facebook.com for the Like box, and the Google Plus button, Twitter too. Nothing fancy here.
Technical SEO | | joechicago0 -
Web config redirects not working where a trailing slash is involved
I'm having real trouble with getting working redirects in place to use on a site we're re-launching with a modified url structure. Old URL: http://www.example.com/example_folder/ New URL: http://www.example.com/example-of-new-folder/ Now, where the old URL's have a trailing slash the web.config simply will not accept it. It says the URL can start with a slash, but not end with a slash. However, many of my URL's do end with a slash so I need a workaround. These are the rules I'm putting in place: <location path="example_folder/"></location> Thanks
Technical SEO | | AndrewAkesson0 -
Changing url structure
We are an ecommerce site established in 2005 and currently have some great rankings. We are about to move away from our existing platform, actinic and move on to Magento. This will change all our url's. What are the steps we should be asking our web developers to follow in order to minimize the consequences of moving? Thank you.
Technical SEO | | LadyApollo0