Upgrading from Sitefinity 3: Extensionless Urls

This post is part of a series exploring my migration from Sitefinity 3 to 4.4. Some of this information may become obsolete as newer versions are released. Always watch the official Sitefinity website for the latest info.

By default, the Sitefinity Migration tool imports content items and pages with their original urls fully intact. That means all your old urls and SEO remain intact, including the original .aspx extensions from the old website.

However, Sitefinity now uses extensionless urls exclusively. Content items and pages have a UrlFormat property that determines how published urls should be formed. This is similar to Sitefinity 3 where you would specify the urlRewriteFormat in the web.config file.

Unfortunately, this means that any new published items, (as well as any imported items that you republish) will force the content item's url to change to that format. Now, you can override this format setting for most of the Sitefinity content types. However, since the urls are no extensionless, there's no way to continue using them in any new items you create.

So instead of trying to find a way to force Sitefinity to use my old url format, I decided it was much better (not to mention cleaner and more SEO friendly) to have my old urls convert to the new format.

Pages

Accomplishing this for pages was a no-brainer. I simply deleted the existing pages, then recreated brand new instances so that they would use all of the Sitefinity defaults. Fortunately, Sitefinity gives you full control over each individual page's urlname, so I just named them as they were, but without the .aspx extension.

Sitefinity-Page-Url

Content Items

Updating the urls for content items is even simpler. Simply republish the content items using the handy batch tools for the module.

Sitefinity-Batch-Publish-Content

Since Sitefinity uses the Urlformat property to generate the url, all of your content items will be updated. Future ones will automatically use that format as well.

Blog Url Format

There was one additional issue when regenerating the urls to match the new format. By default, the Urlname for blog posts also includes the urlname for the blog itself. In other words, the url format for a blog post is [BlogUrlname]/[BlogPostUrlname].

This resulted in urls like http://www.selarom.net/blog/blog/whatever. To resolve this issue, I needed to make a custom blog provider, and I’ll go into more details about that in my next post.

Redirects

Of course, removing the extensions from the urls means that the urls have changed, and if no further action is taken, all of the existing SEO would be lost. Not to mention all the broken links you'd leave scattered around the Internet, and that bad boy is messy enough as it is, thank you very much.

So to fix this, we need a way to redirect all requests to the old urls over to the new ones. Fortunately there’s a great tool to simplify this task, but we'll take a look at that more closely in a future post.

Enjoyed this post and/or found it useful?
Tagged with:
SelArom Dot Net Profile Image
SelAromDotNet

Josh loves all things Microsoft and Windows, and develops solutions for Web, Desktop and Mobile using the .NET Framework, Azure, UWP and everything else in the Microsoft Stack.

His other passion is music, and in his spare time Josh spins and produces electronic music under the name DJ SelArom.



Scroll to top