Internal file extension canonicalization
-
Ok no doubt this is straightforward, however seem to be finding to hard to find a simple answer; our websites' internal pages have the extension .html. Trying to the navigate to that internal url without the .html extension results in a 404.
The question is; should a 401 be used to direct to the extension-less url to future proof? and should internal links direct to the extension-less url for the same reason?
Hopefully that makes sense and apologies for what I believe is a straightforward answer;
-
As above
example/abc rewrites to example/abc.html
example/abc.html redirects to example/abc
and all internal links link to example/abc
-
Thankyou for the replies.
I will try and clarify what I am trying to get at; apologies in advance for any naivety.
I understand homepage canonicalization; the confusion revolves around how this applies to internal pages.
Logically; I am struggling to see how internal pages are any different to a homepage in terms of the need to avoid multiple urls....and thus an extension-less url seemed appropriate. Not too mention the benefit or cleaner urls, easier to link to, remember etc.
i.e.
example/abc
example/abc.html
example/abc.index.html
-
As nick said, you dont need to do this, but if you are.
1. REWRITE the new url to the old url, as your webserver needs to know the extention
2. REDIRECT the old url to the new one, incase you already have links to the old urls, you dont want5 duplicate content
3. you need to make surer that all internal links point to the new url, you dont want un-necessary redirects as they leak link juice.
-
I'm about to make a whole lot of assumptions about your website to give this answer, just be aware.
Your website is built static, using HTML. Hence the .html file extension. If you're seeing websites that don't have file extension, it's most likely they are using content management systems (or have some serious /folder/index.html stuff going on).
Having a file extension like .html or .aspx or .php is not a bad thing. On websites like yours, it is required (unless you do the above subfolder thing) because it's an actual file the browser is grabbing rather than something being dynamically generated by a CMS. It has nothing to do with future-proofing.
As for 301'ing non-extension URLs to extention'd ones...well I don't know why you'd need to do that for your type of site.
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
-
cross canonicalization with redirect
I'm working with a website that has turned one of its pages into its own website within the main website - mostly for the ease of customers, making it simpler to access that page using www.page.com rather than www.mainsite.com/about/page.
Technical SEO | | Shrine.SEO.Gal
As a result, there are two urls for that page (the ones just mentioned), both pointing to the exact same page, but with different urls. Now, they have made it so www.mainsite.com/about/page permanently redirects to www.page.com. which I thought was a good call. However, what do I do about canonicalization? Is it good to point the canonicalization of www.page.com to www.mainsite.com/about/page so that the rankings and link equity are maintained in the main website? Or would the fact that the www.mainsite.com/about/page redirects to www.page.com mess that up? I hope this makes sense!0 -
I am losing 1 point of DA at month? What could it be? I have noticed I have lost 50K (out of 300K) of internal links after a website update, could it be related to that?
I am losing 1 point of DA at month? What could it be? I have noticed I have lost 50K (out of 300K) of internal links after a website update, could it be related to that?
Technical SEO | | albertoalchieriefficio0 -
Domain Types/Extensions – Are .infos any good ?
Hi I know general concensus is to stay away from the non established domain suffix types and concentrate on .coms .co.uk’s etc etc. But i have an aged .info domain that has some content on it related to a online news paper i have on that subject (on the news paper providers domain sub-folder currently) which i want to focus more time on and put on its own dedicated domain. So i want to upload it to this aged .info domain. However waste of time if .info domains are bad for seo etc Does anyone have any experience of .info doing well in serps or should i totally scrap the idea and try find a new .com etc type domain ? My .info has been live with related content for 7 years so hoping that should count for something 🙂 All Best
Technical SEO | | Dan-Lawrence
Dan0 -
So many internal links to the same page
Hey guyz,
Technical SEO | | atakala
I'm working with a client that has a page which has many internal links to the same page .
Let me illustrate it.
So as you can see I have a page which is called in the image "page" :D.
As you can see, the **page **has many links to the solutions.htmls' anchor links which mean they are basically the same page ( solutions.html)
Is it going to be a problem for us to do that ?
And is there anyway to handle this problem?
Thank you for you patience. And sorry for my bad english 😄 4deRc1W.png0 -
Should you use the canonicalization tag when the content isn't exactly a duplicate?
We have a site that pull data from different sources with unique urls onto a main page and we are thinking about using the canonicalization tag to keep those source pages from being indexed and to give any authority to the main page. But this isn’t really what canonicalization is supposed to be used for so I’m unsure of if this is the right move.
Technical SEO | | Fuel
To give some more detail: We manage a site that has pages for individual golf courses. On the golf course page in addition to other general information we have sections on that page that show “related articles” and “course reviews”.
We may only show 4 or 5 on each of those courses pages per page, but we have hundreds of related articles and reviews for each course. So below “related articles” on the course page we have a link to “see more articles” that would take the user to a new page that is simply a aggregate page that houses all the article or review content related to that course.
Since we would rather have the overall course page rank in SERPs rather than the page that lists these articles, we are considering canonicalizing the aggregate news page up to the course page.
But, as I said earlier, this isn’t really what the canonicalization tag is intended for so I’m hesitant.
Has anyone else run across something like this before? What do you think?0 -
File name same as folder name, ok?
Is it ok to have a folder and file name to be both the same e.g domain.com/xyz-products/ domain.com/xyz-products.php File name would be a page that lists a number of products and then within the folder there would be x-product.php, y-product.php etc
Technical SEO | | NeilD0 -
Too Many Internal Links?
Hi Guys, I'm completing a overhawl of our website at the moment have a certain penguin killed our site for our main keyword. I'm currently working on our internal linking as most of our blog posts have a link back to our home page with the main money keyword. At present we have 3,331 internal links and our site has only 1,000 pages. Can you get penalised for having too many internal links with exact match anchors. Thanks, Scott
Technical SEO | | ScottBaxterWW0 -
Is the same content posted under different international TLDs a problem?
Dear all, I have a site which owns .be, .cn, .biz, .com.mx, .de, .us, .info, .net, .org and all run from the same server and have no difference in content i.e. .com.mx/our-services is the same as .com/our-services Google webmaster help created a video that said multiple international TLDs, same content 'should be ok' - http://www.youtube.com/watch?v=Ets7nHOV1Yo - however, I would like confirmation from practitioners! What is the best practice in this case? Considering none of the content is customised, should I create root level redirects to our .com, or leave as is? Thanks! Christian watch?v=Ets7nHOV1Yo
Technical SEO | | ChristianMKTG0