Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Daniel Howell 21 posts 42 karma points
    Nov 05, 2012 @ 01:14
    Daniel Howell
    0

    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

    Although it seems to save the blank Alias... not sure if this is a good thing...

     

  • Daniel Howell 21 posts 42 karma points
    Nov 05, 2012 @ 04:55
    Daniel Howell
    0

    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?

  • Stephen 767 posts 2273 karma points c-trib
    Nov 05, 2012 @ 09:23
    Stephen
    0

    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

    <notFound assembly="umbraco" type="SearchForTemplate"/>

    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?

  • Stephen 767 posts 2273 karma points c-trib
    Nov 05, 2012 @ 09:24
    Stephen
    0

    And also, not that on 4.10 editing config/404handlers.config will _not_ be enough to remove the "template in path" support...

  • Daniel Howell 21 posts 42 karma points
    Nov 19, 2012 @ 00:00
    Daniel Howell
    0

    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.

  • Dennis Milandt 190 posts 517 karma points
    Dec 22, 2012 @ 23:34
    Dennis Milandt
    0

    >> 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?

Please Sign in or register to post replies

Write your reply to:

Draft