Post

301 Redirects in Umbraco

Configuring permanent 301 redirects in Umbraco CMS — both within the same site and cross-domain — using UrlRewriting.config.

Umbraco provides built-in URL rewriting functionality for implementing redirects. Configuration lives in /config/UrlRewriting.config, within the urlrewritingnet > rewrites section.

Internal Site Redirects

To redirect from one page to another on the same site:

<add name="Rule1" 
  virtualUrl="~/page-src" 
  rewriteUrlParameter="ExcludeFromClientQueryString"
  redirect="Application"
  redirectMode="Permanent"
  destinationUrl="~/page-dest" 
  ignoreCase="true" />

Cross-Domain Redirects

To redirect to a page on a completely different domain, use redirect="Domain" and specify the full source URL:

<add name="Rule2" 
  virtualUrl="http://current-domain.com/page-src"
  rewriteUrlParameter="ExcludeFromClientQueryString"
  redirect="Domain"
  redirectMode="Permanent"
  destinationUrl="http://some-other-domain.com/page-dest" 
  ignoreCase="true" />

The key difference between the two:

SettingInternalCross-Domain
virtualUrl~/relative-pathFull URL with domain
redirectApplicationDomain

Both use redirectMode="Permanent" which issues a 301 Moved Permanently response — essential for SEO as it tells search engines to update their index.

← Back to all posts