I’ve tried my best to find information on this topic online, but it doesn’t seem to cover what I’m looking for.
Ideally, we want to achieve two things:
- redirect the .html versions to the pretty URL non HTML versions, e.g. /contact.html to /contact.
- redirect trailing slash version to non trailing slash version, e.g. /contact/ to /contact (or vice versa).
I understand we can use canonical headers or HTML tags to point Google to the preferred URL. The outcome of this is Google should group those URL’s together as the same content, and attribute the rank power to them as a group, displaying only the preferred one in Google. However many in the SEO community seems to be in agreement that although according to Google this is the way to avoid issues with duplicate content, in practise Google doesn’t always apply these rules consistently and will sometimes end up indexing multiple URLs to the same page, therefore splitting rank power between them and damaging SEO. With this in mind, 301 redirecting is better to eliminate the risk.
I also dislike Netlify’s view that ‘if you don’t want Google to find these then don’t link them anywhere’. This is very close to ‘security through obscurity’, and it would be far better to eliminate the risk by redirecting, then to simply have to assume that link will never be found or shared.
So, I have a few questions:
Is the above redirect rules possible in Netlify, and does Netlify have a reason for not recommending redirects as I mention above. I saw reference to Netlify saying something regarding cache hit rate, but what does this mean in practise?
Regarding the netlify.app site, are we able to password protect this, but leave the custom domain version live, either via access control or HTTP Basic Authentication? Again, we want to avoid this ever being publicly accessible especially by Google.
What are the reasons Netlify doesn’t allow you to disable this netlify.app URL? It does seem odd to not have the choice. I know Netlify say it’s for testing purposes, but why not just give us the choice?
I’m already sold on the platform, and I want to move a load of websites to Netlify for hosting, but I just can’t do this until we know SEO efforts will not be effected.
Or - am I wrong? And if I make sure on all pages they have a self referencing canonical tag to the URL of my choice… e.g. /contact (without .html and without trailing slash), there is no chance Google will rank anything but my preferred URL? The reason I’m hesitant to trust this is it leaves you at the mercy of Google rather then controlling the outcome yourself. And unless ‘no chance’ means ‘no chance’, then you’re not able to reliably control the outcome and that is an issue.