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 Value of Google+?
Hi Mozers, Does having a Google+ page really impact SEO? Thanks, Yael
Intermediate & Advanced SEO | | yaelslater1 -
How does a page with a canonical for another domain impact SEO?
Hi, We have a requirement to host files that contains .html, .css, .js, and .pdf files externally on AWS S3 bucket. We have a landing page on our site that contains a link to those external links (i.e. pdf). On our site's (hosted on Drupal), landing page we already have a canonical link for the current landing page. On the .html file which is hosted externally, we were thinking to add the same canonical link that exists for the landing page so that search engines will go to the externally available .html file and interpret that the externally hosted file is related to our landing page. I was wondering if this is an acceptable solution without any SEO penalty. If there is a penalty, what would be the alternative solution to this so we can host files externally and drive most of the traffic to our landing page? Example Landing page: absolute url = https://www.site-domain.com/page-url ...... Externally available .html file (static) ......
Intermediate & Advanced SEO | | KendallHershey0 -
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 -
6 .htaccess Rewrites: Remove index.html, Remove .html, Force non-www, Force Trailing Slash
i've to give some information about my website Environment 1. i have static webpage in the root. 2. Wordpress installed in sub-dictionary www.domain.com/blog/ 3. I have two .htaccess , one in the root and one in the wordpress
Intermediate & Advanced SEO | | NeatIT
folder. i want to www to non on all URLs Remove index.html from url Remove all .html extension / Re-direct 301 to url
without .html extension Add trailing slash to the static webpages / Re-direct 301 from non-trailing slash Force trailing slash to the Wordpress Webpages / Re-direct 301 from non-trailing slash Some examples domain.tld/index.html >> domain.tld/ domain.tld/file.html >> domain.tld/file/ domain.tld/file.html/ >> domain.tld/file/ domain.tld/wordpress/post-name >> domain.tld/wordpress/post-name/ My code in ROOT htaccess is <ifmodule mod_rewrite.c="">Options +FollowSymLinks -MultiViews RewriteEngine On
RewriteBase / #removing trailing slash
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ $1 [R=301,L] #www to non
RewriteCond %{HTTP_HOST} ^www.(([a-z0-9_]+.)?domain.com)$ [NC]
RewriteRule .? http://%1%{REQUEST_URI} [R=301,L] #html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^.]+)$ $1.html [NC,L] #index redirect
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index.html\ HTTP/
RewriteRule ^index.html$ http://domain.com/ [R=301,L]
RewriteCond %{THE_REQUEST} .html
RewriteRule ^(.*).html$ /$1 [R=301,L]</ifmodule> The above code do 1. redirect www to non-www
2. Remove trailing slash at the end (if exists)
3. Remove index.html
4. Remove all .html
5. Redirect 301 to filename but doesn't add trailing slash at the end0 -
Different URL structure Desktop VS Mobile Regarding SEO when building a new seperate mobile site
Hi I have a old OScommerce webshop, that i will keep for now, but i have build a complete new mobile site for mobile devices, but it has another url structure. Can i launch this site without any problems when its Google Mobile Search Engine that index the mobile site, and then just make the neccesary rel alternate tags for the desktop site for the product pages and main categories that i can. There will be some differences in the urls i cant make a alternate for.
Intermediate & Advanced SEO | | noerdar0 -
Replace dynamic paramenter URLs with static Landing Page URL - faceted navigation
Hi there, got a quick question regarding faceted navigation. If a specific filter (facet) seems to be quite popular for visitors. Does it make sense to replace a dynamic URL e.x http://www.domain.com/pants.html?a_type=239 by a static, more SEO friendly URL e.x http://www.domain.com/pants/levis-pants.html by creating a proper landing page for it. I know, that it is nearly impossible to replace all variations of this parameter URLs by static ones but does it generally make sense to do this for the most popular facets choose by visitors. Or does this cause any issues? Any help is much appreciated. Thanks a lot in advance
Intermediate & Advanced SEO | | ennovators0 -
Server cache and SEO
I have a question about server cache and seo. For example. www.chanel.com.cn , the server is in US, and uses China Cache to improve local Chinese users access speed, so what do you think this way will work for search engines spiders too? when a spider is crawlling the website, does the content it crawl on US server or China cache? what's best practice for those kind of SEO on server side? thanks Boson
Intermediate & Advanced SEO | | topchinaseo0 -
In-House SEO - Doubt about one SEO issue - Plz guys help over here =)
Hello, We wanna promote some of our software's. I will give u guys one example bellow: http://www.mediavideoconverter.de/pdf-to-epub-converter.html We also have this domain: http://pdftoepub.de/ How can we deal about the duplicate content, and also how can we improve the first domain product page. If I use the canonical and don't index the second domain and make a link to the first domain it will help anyway? or don't make any difference? keyword: pdf to epub , pdf to epub converter What u guys think about this technique ? Good / Bad ? Is there the second domain giving any value to the first domain page? Thanks in advance.
Intermediate & Advanced SEO | | augustos0