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
-
New websites issues- Duplicate urls and many title tags. Is it fine for SEO?
Hey everyone, I have found few code issues with our new website and wanted to see how bad those problems are and if I have missed anything. If someone can take a look at this and help me it would mean the world. Thank you. all! We hired an agency to design a new site for us and it's almost ready, but the other day I found some problems that made me wonder if this new site might not be as good as I thought and I wanted to ask you to take a look at the code and possibly help me understand if from SEO prospective it is sound. But I really want someone who understands SEO and web design to look at our code and point out what might be wrong there. Here is a link to the actual site which is on a new server: http://209.50.54.42/ What I found few days ago that made me wonder something might not be right. Problem 1. Each page has 3 title tags, I guess whatever template they are using it automatically creates 3 title tags. When you do " View Page Source" For example on this url: http://209.50.54.42/washington-dc-transportation when you view the code, the lines Lines 16,19 and 20 have the title tag which in my opinion is wrong and there should only be one. Could this hurt our SEO? Problem 2. Infinite duplicate urls found All following pages have INFINITE NUMBER OF DUPLICATE URLS. EXAMPLE: http://209.50.54.42/privacy-policy/8, http://209.50.54.42/privacy-policy/1048, http://209.50.54.42/privacy-policy/7, http://209.50.54.42/privacy-policy/1, http://209.50.54.42/privacy-policy you can add any type of number to this url and it will show the same page. I really think this 2nd problem is huge as it will create duplicate content. There should be only 1 url per page, and if I add any number to the end should give a 404 error. I have managed to find these 2 issues but I am not sure what else could be wrong with the code. Would you be able to look into this? And possible tell us what else is incorrect? I really like the design and we worked really hard on this for almost 5 moths but I want to make sure that when we launch the new site it does not tank our rankings and only helps us in a positive way. Thanks in advance, Davit
Intermediate & Advanced SEO | | Davit19850 -
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 -
Images with a token in the url, in Drupal. How does it affect to SEO?
Hi everyone! I am checking now a website that works with Drupal, and I found that images have urls like this... http://www.brandname.com/sites/default/files/styles/directory_xyz/public/name-of-the-picture.png?itok=T89RpzrK I was wondering how an URL like that with the token at the and, can affect to SEO. I cound't find anything. Anyone knows? Thank you!
Intermediate & Advanced SEO | | teconsite0 -
Pixel tags impact on SEO?
I was asked by our IT if switching to a tag management company that removes the pixels from our site and is replaced by a javascript would have a negative impact on SEO. I have not been able to find anything that discusses this: Does anyone have experience with this? Has it caused any issues? Has it caused any issues? How do crawlers see pixel data, and what do they do with it?
Intermediate & Advanced SEO | | Shawn_Huber0 -
Best place to submit an SEO RFP? Anyone interested in 60 hours of SEO work?
I have a small SEO project (~ 60 hours of work) that I would like to get some help with. It is spread out over the span of 4 to 6 months (2 to 3 hours of work a week with the help of 10 - 15 support staff hours per week), and if it goes well there is an opportunity to extend the project through the rest of 2014. Does anyone here want to see the RFP or have any recommendations on where I can submit this request to get the maximum exposure? Thanks!
Intermediate & Advanced SEO | | pbhatt0 -
Hosting Providers and SEO
I have been wondering for a while which web host provider is the best for SEO purposes? Things to consider. Shared Hosting vs Dedicated Server Location of the Host Provider Site Up Time One question that I have been thinking about is what impact would changing a host provider have on a websites serps ranking? Is there a possible negative impact and if so how can it be avoided? Name the top 3 Web Hosts for SEO.
Intermediate & Advanced SEO | | bronxpad0 -
Looking for a SEO client activity timeline or flow chart
Hello, I am working on a research project where I need to put together a SEO client activity flow chart. For example: Week 1: Hold client SEO kickoff meeting Review client site for crawl and accessibility errors. Check Google Analytics and webmaster tools Do keyword research Map keywords to content pages Fix on-page optimization Order content Month 2: ... Thanks in advance for your help!
Intermediate & Advanced SEO | | wparlaman0 -
Preparing a DotNetNuke Active Forums site for SEO push
I'm in the process of buying and running an existing forum that is running on DotNetNuke 5.2.0 and Active Fours 4.1. As part of the transfer, I'm asking that the site be upgraded to the latest version of DNN and AF 4.3. AF 4.3 has SEO-friendly URLs instead of the current long, ugly default URLs, and I'm looking forward to implementing that feature. My specific question is: What would you do to prepare for this upgrade in terms of the content, especially related to the URL changes? I've gone into Google Analytics and downloaded content by page title, exported the first 1000 results, and put those titles into Word and corrected spelling errors in the title so URLs will be based on correct spellings. General background: The site is not currently monetized, and there will not be an initial focus on monetization and likely only smaller efforts (affiliate Amazon links in a resource section) in the future. The site is free for users. I'm fine with taking a hit in organic traffic in the short term. About 1/3 of the traffic is from search engines right now, and less than 30% of the visitors are new visits. The site is going to continue much the same as it has until now. Same moderators, same purpose, same skin, etc. I have access to GA, site is verified in GWT, need to verify in Bing, and I do have root access to the server. I've already started working on image file sizes, both of user-submitted images and site-related images like the header. Until now, I have no experience with DNN or AF or any of the extensions (and am appalled at the price and lack of features of some of those extensions, compared to what I'm used to for WordPress). More general questions: In terms of SEO, I'm intending to treat the upgrade of the forum with the friendly URLs as a re-launch. I'm wanting good URLs, put in a site map, fix non-www to www, etc. When I start making the changes and submitting the site map and generally drawing Google's attention, I want Google to like what it sees, and have as much optimized as possible when googlebot comes around. My goal is to draw more targeted visitors from search that are interested in the content in the site. What other suggestions do you have for the site prep, both from being a forum in general and specifically on DNN/AF? I'm not putting the URL out just yet, as we haven't announced to the users the change of ownership is taking place. Thanks everyone!
Intermediate & Advanced SEO | | KeriMorgret1