I've got a question for using Umbraco 4.1 - For each page that I create on the site, it seems that an unauthenticated user can access it via multiple URLs, especially when "directory mode" is turned on. For example:
From a search/SEO standpoint, this isn't exactly ideal if these URLs end up getting picked up by a search engine like Google, as this is extremely redundant content to it. Is there any way to enforce (via a 301 redirect) that a single URL be used? Ideally it'd use the directory mode without the trailing slash
Any idea on the best way to accomplish this before I start creating up my own IIS Module for intercepting these requests and redirecting them to the correct URL? Would preview mode break if I redirected the 1214.aspx or 1214 URLs?
I'm pretty sure that the 1234.aspx pages are required as these are the "true" pages that are then re-written using the URL rewriting module in Umbraco. I think it's better to solve the SEO problem by adding a canonical link into the page - checkout http://our.umbraco.org/projects/developer-tools/canonical-meta-link-package
Another suggestion I have found is to be consistent within your sites navigation, sitemap and internal links. That way the search engines will never be exposed to the alternative URL's so will not know or care about their existence.
As far as I am aware I have never had a SE do a search of a .aspx or /1234 page on any of my sites.
(I'm pretty sure redirecting 1234.aspx will be a bad idea and is likely to have unintended consequences.)
Pete, I confess I haven't actually used it in anger. I assumed it worked. I think I look at the code once and it was pretty simple. Remember, you need to have head runat="server" on your pages.
Yeah, that's essentially what I did as I thought a package was overkill.
For people reading this you essentially need to compare the URL Umbraco generates using NiceUrl() with the actual URL being displayed (ie. Request.Url) and if they are not the same generate the canonical link using the NiceUrl. Pretty simple in a Razor script.
Preventing Multiple URLs for a single page
Hi Everyone:
I've got a question for using Umbraco 4.1 - For each page that I create on the site, it seems that an unauthenticated user can access it via multiple URLs, especially when "directory mode" is turned on. For example:
http://localhost/1214.aspx (preview mode)
http://localhost/1214 (preview mode)
http://localhost/pets/dogs/behavior/your-dog-is-talking
http://localhost/pets/dogs/behavior/your-dog-is-talking/
http://localhost/pets/dogs/behavior/your-dog-is-talking.aspx
From a search/SEO standpoint, this isn't exactly ideal if these URLs end up getting picked up by a search engine like Google, as this is extremely redundant content to it. Is there any way to enforce (via a 301 redirect) that a single URL be used? Ideally it'd use the directory mode without the trailing slash
http://localhost/pets/dogs/behavior/your-dog-is-talking
Any idea on the best way to accomplish this before I start creating up my own IIS Module for intercepting these requests and redirecting them to the correct URL? Would preview mode break if I redirected the 1214.aspx or 1214 URLs?
Sorry - Not Umbraco v4.1, v4.7.1.1 is what we are using.
I'm pretty sure that the 1234.aspx pages are required as these are the "true" pages that are then re-written using the URL rewriting module in Umbraco. I think it's better to solve the SEO problem by adding a canonical link into the page - checkout http://our.umbraco.org/projects/developer-tools/canonical-meta-link-package
Another suggestion I have found is to be consistent within your sites navigation, sitemap and internal links. That way the search engines will never be exposed to the alternative URL's so will not know or care about their existence.
As far as I am aware I have never had a SE do a search of a .aspx or /1234 page on any of my sites.
(I'm pretty sure redirecting 1234.aspx will be a bad idea and is likely to have unintended consequences.)
OK good to know -- I'll leave it alone for now and maybe just keep an eye on google webmaster tools.
dan, have you successfully used the canonical package? just had a go and had some epic fail...
Pete, I confess I haven't actually used it in anger. I assumed it worked. I think I look at the code once and it was pretty simple. Remember, you need to have head runat="server" on your pages.
Yeah. set up as documented. Oh well. Maybe it worked once! Just wrote my own better one instead :)
seemed a bit overkill to have a package for something so simple anyway if i'm honest.
Yeah, that's essentially what I did as I thought a package was overkill.
For people reading this you essentially need to compare the URL Umbraco generates using NiceUrl() with the actual URL being displayed (ie. Request.Url) and if they are not the same generate the canonical link using the NiceUrl. Pretty simple in a Razor script.
is working on a reply...