When you enable extensionless urls (directoryUrls) in Umbraco, the url changes from /my-page/my-subpage.aspx to /my-page/my-subpage. But I've heard that it might be better to add an appending slash, so it would be /my-page/my-subpage/
Can anyone confirm this? In that case I guess we should change Umbraco's behaviour.
Have you've got a source of the statement? I would have thought that having a trailing slash would more indicate that you're within that folder, that you're at /my-page/my-subpage/default.aspx. At least that's how I'd see it.
If it was going to be implemented I think it should be an opt-in feature, otherwise it changes the operation of 4.1 from all previous versions, and that could add problems when upgrading an existing site.
I've heard this as well, usually for SEO reasons and/or customer preferences. As it is now, there's no way to force a slash at the end within umbraco, though perhaps url rewriting might be an option. If it added to umbraco for directoryUrls, it should be an option to include a trailing slash or not with the default being "no trailing slash" for backward compatibility with previous version of umbraco.
I have had client requests to modify the core to append the slash. I have also had to add redirect code (user control) to account for the various canonical URLs (ie: /page.aspx, /page, and /page/ are all different in SEO).
I personally would love to see the extension be a setting, such that you can define ".aspx", "/", "", or even something legacy.. ".asp" (with the proper mappings of course"). This would allow the transition from old sites in other languages to go much easier, especially when the site has high rankings already.
@doug, umbraco will currently resolve the URL either way, but I get the point that having them render with the backslash all the sudden creates the canonical issue of the page being referenced multiple ways. A 301 redirect would be necessary for all the old pages. The problem with the URL rewrites is accounting for all the non-umbraco content pages when appending the slash. You have to ignore the umbraco folder, any asmx, and various other extensions that .NET uses. I have yet to be successful in finding the regex for all of that.
@slace, the idea behind the trailing slash is to have the search engines weight the page more as it is a default page of a section. You can do a quick search on SEO and trailing slash, and there will be a ton of articles.
However, there are also studies that show having root level pages weight the site higher than having a structured site. Thus, having all your pages in the root seems to get better results versus the hierarchical structure we would expect. Again, this is another feature that my clients have requested that the generated url be something unique to the root of the site, versus the generated hierarchical page.
I've heard it multiple times - next time I see it I'll make sure to remember the link.
I can't see where issues with old versions would be. There shouldn't be any b/w compatibility issues with Umbraco if we added a trailing slash as long as old urls would work (and they would) and those without trailing slash added a 301 redirect to the same url with the slash appended no?
@Casey - thanks for the links, SEO is something I'm not really down with, there's a separate department here that's responsible for that task. But I've never had that request from them.
@Niels - The only reason I played devils advoct with backwards compatibility was to make sure that a) someone did and b) to make sure that a redirect handler for the old URL's was being considered ;)
I'm not an SEO expect but I believe that you needn't lose your page rank. You could switch to directoryUrls and add a small control to the master template that 301 redirects to the directoryurl if it detects a *.aspx url is being used.
Google (and hopefully all major search engines) will respect this change and maintain your page rank.
When you switch to directory urls, the page is still accessable via the .aspx extension. Therefore if you add a canonical tag to your pages, the next time google spiders the .aspx url, it will find the canonical link (which will point to the extentionless url) and will index that page. You won't lose any page rank or google index positions.
Short answer: It doesn't matter, just pick one format and stick to it. (personally I think website.com/whatever is more natural for "normal" people to remember and type than website.com/whatever/)
Extensionless urls - with or without slash
When you enable extensionless urls (directoryUrls) in Umbraco, the url changes from /my-page/my-subpage.aspx to /my-page/my-subpage. But I've heard that it might be better to add an appending slash, so it would be /my-page/my-subpage/
Can anyone confirm this? In that case I guess we should change Umbraco's behaviour.
/n
Have you've got a source of the statement? I would have thought that having a trailing slash would more indicate that you're within that folder, that you're at /my-page/my-subpage/default.aspx. At least that's how I'd see it.
If it was going to be implemented I think it should be an opt-in feature, otherwise it changes the operation of 4.1 from all previous versions, and that could add problems when upgrading an existing site.
I've heard this as well, usually for SEO reasons and/or customer preferences. As it is now, there's no way to force a slash at the end within umbraco, though perhaps url rewriting might be an option. If it added to umbraco for directoryUrls, it should be an option to include a trailing slash or not with the default being "no trailing slash" for backward compatibility with previous version of umbraco.
cheers,
doug.
I have had client requests to modify the core to append the slash. I have also had to add redirect code (user control) to account for the various canonical URLs (ie: /page.aspx, /page, and /page/ are all different in SEO).
I personally would love to see the extension be a setting, such that you can define ".aspx", "/", "", or even something legacy.. ".asp" (with the proper mappings of course"). This would allow the transition from old sites in other languages to go much easier, especially when the site has high rankings already.
@doug, umbraco will currently resolve the URL either way, but I get the point that having them render with the backslash all the sudden creates the canonical issue of the page being referenced multiple ways. A 301 redirect would be necessary for all the old pages. The problem with the URL rewrites is accounting for all the non-umbraco content pages when appending the slash. You have to ignore the umbraco folder, any asmx, and various other extensions that .NET uses. I have yet to be successful in finding the regex for all of that.
@slace, the idea behind the trailing slash is to have the search engines weight the page more as it is a default page of a section. You can do a quick search on SEO and trailing slash, and there will be a ton of articles.
However, there are also studies that show having root level pages weight the site higher than having a structured site. Thus, having all your pages in the root seems to get better results versus the hierarchical structure we would expect. Again, this is another feature that my clients have requested that the generated url be something unique to the root of the site, versus the generated hierarchical page.
ref: http://searchengineland.com/a-case-study-in-changing-url-structure-20136
@nh, below is an article that discusses the issue. It gives a good explanation of everything.
http://www.ragepank.com/articles/68/that-trailing-slash-does-matter/
Perhaps this is something to consider adding as well.
Google advice for the canonical tag: http://searchengineland.com/googles-advice-on-using-the-new-canonical-tag-16931
I've heard it multiple times - next time I see it I'll make sure to remember the link.
I can't see where issues with old versions would be. There shouldn't be any b/w compatibility issues with Umbraco if we added a trailing slash as long as old urls would work (and they would) and those without trailing slash added a 301 redirect to the same url with the slash appended no?
@Casey - thanks for the links, SEO is something I'm not really down with, there's a separate department here that's responsible for that task. But I've never had that request from them.
@Niels - The only reason I played devils advoct with backwards compatibility was to make sure that a) someone did and b) to make sure that a redirect handler for the old URL's was being considered ;)
Guys, It would be great to enable this feature for nodes that were created after a specific datestamp.
I'd love to switch my sites to use directoryUrls but I don't want to lose page rank for all of my existing pages.
Hi Darren,
I'm not an SEO expect but I believe that you needn't lose your page rank. You could switch to directoryUrls and add a small control to the master template that 301 redirects to the directoryurl if it detects a *.aspx url is being used.
Google (and hopefully all major search engines) will respect this change and maintain your page rank.
Chris
Hi Darren,
When you switch to directory urls, the page is still accessable via the .aspx extension. Therefore if you add a canonical tag to your pages, the next time google spiders the .aspx url, it will find the canonical link (which will point to the extentionless url) and will index that page. You won't lose any page rank or google index positions.
This is what I have done on my site:
http://www.nfltips.org/nfl-picks.aspx has a canonical tag pointing to my prefered URL which is http://www.nfltips.org/nfl-picks
As for the trailing slash, I personaly prefer not to include it.
Cheers,
Aaron
Not sure why I remembered this thread, but hey. -> http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
Short answer: It doesn't matter, just pick one format and stick to it. (personally I think website.com/whatever is more natural for "normal" people to remember and type than website.com/whatever/)
Also combine with http://our.umbraco.org/wiki/how-tos/create-canonical-urls-using-xslt-macro
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.