Does having active urls with and without trailing .html impact SEO?
-
A recent update resulted in duplication of urls on our site due to inconsistent url structure:
Example:
- /category2.html and /category2 both active on the site as the same page
Will this hurt and should we create redirects using only one version of the url?
- /category2.html redirect to /category2
-
It may do or it may not. It may or may not impact upon duplicate content, it always impacts upon crawl allowance
I'm going to use trailing slash URLs (a more common issue and consolidation feature) in my example, but it's equally applicable for stripping .HTML or non-resource (PDF, JPG, JS etc) file extensions
Quite a lot of sites, even if they refuse to clean this up, will at least 'canonical' one URL to the other. That let's Google know that one version of the page is canonical and should receive relevant SEO traffic - it avoids content duplication related penalties or algorithmic devaluations. There are two things it doesn't help Google out with
- It doesn't tell Google not to crawl both URLs (you might say the canonical tag does that, but keep in mind Google has to have already loaded both URLs to read both canonical tags so... no)
- It doesn't consolidate SEO authority to the same degree that 301 redirects do. Say one page has some nice backlinks and the other one does too, that 'ranking benefit' won't all be consolidated onto one page. The canonical tag will make sure only one page ranks, but it won;t gain the 'optimal' benefit of the backlinks for both web-pages (301s do a better job of that, generally)
So as you can see, even if you avoid content duplication issues, there are other problems that could potentially arise. This being the case, it's best to consolidate your URL architecture at and and all levels
My preference is this logic in the htaccess (via 301s):
- Always force a trailing slash for pages (as they may have sub-pages, and can also be directories)
- EXCEPT if the active URL is a file (e.g: somesite.com/some-folder/some-image.jpg) - in which case, do not force a trailing slash (files are never folders / directories)
- But if the file extension is page-based rather than resource based (e.g: .html) then strip the extension and finish with a trailing slash
SEO is about avoiding risk. If there is conflicting information on a subject, pick the tried and tested (safe) method
Note that if you are on an MS / IIS server (rather than Linux / Apache) you may have to modify web.config instead of '.htaccess'
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
-
SEO Quake says that 75 characters are optimal for the URL and Moz says it is too long. Who shall we trust?
SEO Quake says that 75 characters are optimal for the URL and Moz says it is too long.
Intermediate & Advanced SEO | | Madlena
Also Moz says that 92 meta description is too long buy SEO Quake says 92 characters — average. Most optimal 10 - 70 characters.
What is the truth?0 -
Changing existing URL to boost SEO
What's best practice regarding changing URLs for SEO? If the page contains great information around a particular term but the URL is not reflective of this and thus the page isn't ranking should the URL be changed? Or is it always a hard and fast no? It would seem to make sense to me if the page didn't have any backlinks already and Organic clicks were minimal. Sam
Intermediate & Advanced SEO | | Samsam00000 -
Trailing Slashes on URLs
Hi we currently have a site on Wordpress which has two version of each URL trailing slash on URLs and one without it. Example: www.domain.com/page (preferred version - based on link data) www.domain.com/page**/** The non-slash version of the URL has most of the external links pointing to them, so we are going to pick that as the preferred version. However, currently, each version of every URL has rel canonical tag pointing to the non-preferred version. E.g. www.domain.com/page the rel canonical tag is: www.domain.com/page/ What would be the best way to clean up this setup? Cheers.
Intermediate & Advanced SEO | | cathywix0 -
Two Companies Merging - Impacts on SEO
Hi there! I work with Company A. They've decided to merge with Company B (who we don't work with/doesn't do SEO) under Company B's name. (We would then work on Company B's website.) What would be the impact on SEO if the content from Company A's website is moved to Company B's website, and Company A's website would be deleted? Factors to consider: Both websites have a domain authority of 6 and a homepage authority of 21, and each has less than 5 backlinks. Company A ranks much better than Company B (of the KWs we're tracking, Company A ranked on Page One for 15.3% of them, while Company B ranked for 2.8% of them). So, what I am asking is: If they do the content migration to Company B's website and get rid of Company A's website, what negative impact would that have on SEO? Could we keep both sites, but change the mentions of Company A on their website to Company B? Although the URL would still be Company A's name, could Company B treat this as a microsite and take up more of the search engine real estate since Company A already has rankings? What would be another solution? The companies merging is definitely happening. Thank you in advance.
Intermediate & Advanced SEO | | BlueCorona1 -
Best SEO url woocommerce, what to do?
Hi! Today we have our product categories indexed (by misstake) and for one of our desired keywords, a category have the nr 1 rank. By misstake, we didnt set nofollow, noindex on our categories, just tags, archives etc. We are now migrating to from Ithemes Exchange to Woocommerce and ime looking on improving our SEO urls for the categories. For keyword "Key1" we rank with this url: http://site/product-category/Key1. The seo meta title and description where untouched when we launched the site last spring so it doesnt look so good.. The plan is to stripe out product-category and instead ad some description ( i have a newly written text of 95 words, 519 letters without space with they keyword precent 5 times in a natural way ) to that particular category and have the url as following: http://site/key1 and then have a 301 redirect for the old http://site/product-category/Key1. What do you think of this? What shall i consider? on the right track? Grateful for any help! // Jonas
Intermediate & Advanced SEO | | knubbz0 -
Where do we focus from an SEO perspective?
I run a digital business development consulting company. Our core has always been centered around consulting with client to develop strategy and then working with a set of vendors in a variety of different services types to implement the strategy. I'm struggling right now to determine the best approach for our own SEO. Our website is http://phase2solutions.net. What suggestions would you have on the approach here? Feel free to share your service as well as the tactical end is something we are looking to outsource. Thank you.
Intermediate & Advanced SEO | | phase2solutions0 -
How much does dirty html/css etc impact SEO?
Good Morning! I have been trying to clean up this website and half the time I can't even edit our content without breaking the WYSIWYG Editor. Which leads me to the next question. How much, if at all, is this impacting our SEO. To my knowledge this isn't directly causing any broken pages for the viewer, but still, it certainly concerns me. I found this post on Moz from last year: http://moz.com/community/q/how-much-impact-does-bad-html-coding-really-have-on-seo We have a slightly different set of code problems but still wanted to revisit this question and see if anything has changed. I also can't imagine that all this broken/extra code is helping our page load properly. Thanks everybody!
Intermediate & Advanced SEO | | HashtagHustler0 -
Expiring URL seo
a buddy of mine is running a niche job board and is having issues with expiring URLs. we ruled it out cuz a 301 is meant to be used when the content has moved to another page, or the page was replaced. We were thinking that we'd be just stacking duplicate content on old urls that would never be 'replaced'. Rather they have been removed and will never come back. So 410 is appropriate but maybe we overlooked something. any ideas?
Intermediate & Advanced SEO | | malachiii0