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
-
International targeting, translation, URL indexing confusion
Hi all! I rarely work with businesses who target countries outside of the US so I wanted to see if I'm missing anything here on the URL/translation front. I'm no developer, so this is crossing over a bit beyond my realm of expertise... From what I understand (and after briefly review Google's documentation) we should be good to go after having implemented the following two line items... We used a plugin to create different version of our site pages in multiple languages..those live at URLS like this https://www.exfreight.com/fr/ That plugin also implements the hreflang tag and I did check to see that it was actually in the site code Is there anything else we need to do to ensure proper indexing / organization by Google? Should we take the step of creating and adding sitemaps for each language version to our Webmaster account? K6nIhvD
Technical SEO | | RickyShockley0 -
Link's that are an internal site search?
Hi hope your're all well. I sell Red, Blue, Green Widgets within each color I have many sub types, the subtypes change all the time,and a sub type has many variations in itself. I'd like to set up links that direct customers to popular searches of sub types say: widgets.com/red/blue-spots....search string... Will Google crawl these search links and see that there is good content behind it? How does Google handle links that are also a site search? Can it be bad and should I "no follow" them? Hope someone can give me some direction on these, many thanks in advance!
Technical SEO | | Thea880 -
Cant find internal links on one of my pages.
When I run open site explorer for www.kingremodeling.com/ss.php?pid=5 it says there are 40 links to it on my site. However, I cannot find these links on any of the pages that open site explorer lists such as my homepage www.KingRemodeling.com. Totally confused!
Technical SEO | | allb830 -
SEO Terms for Internal Vs External
Hey there! I am writing up an SEO plan for our company and wanted to get the groups input on the use of some SEO terms. I need to organize and explain these efforts to nonSEO people. I usually talk about, SEO in terms of "Internal" vs "External" efforts. Internal SEO efforts being things like Title Tags, Description Tags, Page Speed, Minimizing errors, proper 301 redirect, content development for the site, internal linking and anchor, etc. External SEO efforts being things like Link building, social media profile setups and posts (FB Twitter Pinterest, YouTube), PR work. How do you split these out? What terms do you use? Do you subdivide these tasks? What terms do you use? For example, with Internal, I sometimes talk about "Technical SEO" that has do to with making sure that site speed is working well, 301s are setup correctly, noindex tag etc are all used properly. These are things that different versus "On Page" efforts to use keywords properly etc. I will also use the term "Site Visibility" for non SEOs to explain the technical impact. For example, if your site has the wrong robots.txt, if you have 500 errors everywhere and a slow site, if you are sending spiders down a daisy chain of 301s, it is difficult for the key parts of your site to be found and so your "Visibility" to the engines are poor. You have to get your visibility up, before you begin to then worry about if you have the right keywords on a page etc. Any input or references would be appreciated.
Technical SEO | | CleverPhD0 -
Canonicalization - Some advice needed :)
Hi guys, To be honest, it's a little bit embarrassing to throw out this question but it's one of the weakest points of knowledge at the moment for me. I've tried to get a grasp of canonical URLs and what it all means. From my understanding, it's informing Google which page to take into consideration when there's the possibility for duplicate content. Right? However, with the site I'm working on I'm not sure if it would be worth putting site-wide and the impact it would have. Site I'm working on - http://bit.ly/N7eew7 With the nature of the site, there would be a lot of duplicated content as there's the possibility that several properties listed could have a similar address due to being in the same building etc. From what I can see, no canonical URL was setup on the homepage. The other variations of the homepage URL are 301 redirecting to thee http:/www. version. Can someone explain it all to me in simple terms? Honestly believe that I'm getting more confused by the minute. Thanks guys for your patience 🙂
Technical SEO | | MarkScully1 -
Internal links - is div on click still no followed by google?
Hi Mozzers Does anyone know if are still no followed by Google From a UX perspective, making a container div clickable will work well, but i don't want this link to absorb any link juice as text within the div would make much better anchor text, so i would rather that link was receiving the juice. Is the above the best approach to this issue of UX vs SEO? Many thanks Justin
Technical SEO | | JustinTaylor880 -
Does Google index XML files?
Does Google or other search engines include XML files in their index? More specifically, I am wondering how Google knows the difference between an xml filetype and an RSS feed.
Technical SEO | | nicole.healthline0 -
Canonicalization
Having been a member of SEOmoz Pro tools for only a couple of months, I'm now at a point where there are certain issues with our recently overhauled site: On my latest "Open Site Explorer Report" I am seeing a number of external links going to the HTTP://Domainname.com and a number pointing at HTTP://wwwDomainname.com. This only appears when I pull the report from the Root Domain. If I pull a report from the Sub-domain all URL's are the same. Does this matter too much? Would best practice be to put a rel=canonical on the Non www ? Thanks for any help in advance Sean
Technical SEO | | Yozzer0