We are NOT using alttemplates in any form on our website... the "Alias" field in the template is set to the default that umbraco gives each template on creation.
So say we have a template called template1 on our site. Using the alttemplate feature of umbraco it is possible to set that template for any page on the site. Eg:
mywebsite.blah/page/template1 (we are using directory urls).
This loads "page" using template1 as the template.
Now, even though we have no such link on the site, somehow google is indexing both /page/ and /page/template1... and this is happening for multiple pages on the site. This is not good for our SEO.
So, is there a way to disable the alttemplate feature of umbraco completely, since we don't want to use it?
We have removed the "Alias" for all of our templates, and umbraco throws an error saying
Template not saved
Please make sure that you do not have 2 templates with the same alias
Although it seems to save the blank Alias... not sure if this is a good thing...
Okay, so removing the alias is a VERY bad idea. Seems umbraco uses the alias to determine the file on disk, and so multiple templates got overwritten by 1 template... great stuff.
So my original question still stands - is there a way to disable alttemplate functionality?
And that will disable the "template in path" support ie /path/to/page/template. It will _not_ disable the "template in query" support ie /path/to/page?altTemplate=template. That being said,
If Google wants to index /page/template1 it must have known about template1 at one point? The real question I think is, how come Google knows about that url and wants to index it? Is there a link somewhere on your site, or even somewhere else, to that page?
Thanks Stephen - we ended up just renaming the alias to something else - no idea how Google knew about the page - I have a feeling it might have something to do with an xml sitemap plugin we installed. Will keep an eye on it.
Disable alttemplate - causing issues with SEO
Ill try and explain the scenario...
We are NOT using alttemplates in any form on our website... the "Alias" field in the template is set to the default that umbraco gives each template on creation.
So say we have a template called template1 on our site. Using the alttemplate feature of umbraco it is possible to set that template for any page on the site. Eg:
mywebsite.blah/page/template1 (we are using directory urls).
This loads "page" using template1 as the template.
Now, even though we have no such link on the site, somehow google is indexing both /page/ and /page/template1... and this is happening for multiple pages on the site. This is not good for our SEO.
So, is there a way to disable the alttemplate feature of umbraco completely, since we don't want to use it?
We have removed the "Alias" for all of our templates, and umbraco throws an error saying
Template not saved
Please make sure that you do not have 2 templates with the same alias
Okay, so removing the alias is a VERY bad idea. Seems umbraco uses the alias to determine the file on disk, and so multiple templates got overwritten by 1 template... great stuff.
So my original question still stands - is there a way to disable alttemplate functionality?
Do not remove the alias, it is required.
At the moment on pre-4.10 ie up to 4.9.x you can edit config/404handlers.config and remove the line that reads
And that will disable the "template in path" support ie /path/to/page/template. It will _not_ disable the "template in query" support ie /path/to/page?altTemplate=template. That being said,
If Google wants to index /page/template1 it must have known about template1 at one point? The real question I think is, how come Google knows about that url and wants to index it? Is there a link somewhere on your site, or even somewhere else, to that page?
And also, not that on 4.10 editing config/404handlers.config will _not_ be enough to remove the "template in path" support...
Thanks Stephen - we ended up just renaming the alias to something else - no idea how Google knew about the page - I have a feeling it might have something to do with an xml sitemap plugin we installed. Will keep an eye on it.
>> And also, not that on 4.10 editing config/404handlers.config will _not_ be enough to remove the "template in path" support...
So how do you disable alttemplates today?
is working on a reply...