Tel: 0151 223 0001

We believe in three things: users, users, users.

301 Redirect in Umbraco

301 Redirect in Umbraco - brought to you by sdesign1 - Umbraco specialists

301 redirects are setup on sites that exist as seperate websites but have the same content. For example, the domain http://mydomain.com could also be viewed at a webhosting address such as, http://wehosting.mydomain.com. Google would penalise you for this as the same content exists at two seperate locations on the web.

To avoid getting penalised by Google, you should setup a 301 permanent redirect, which will send the user who visits "http://wehosting.mydomain.com" and send them directly to "http://mydomain.com". To do this in Umbraco you need to:

  • use an FTP client to browse to /config/UrlRewriting.config
  • Download and open this file
  • Add the following code:

<add name="301redirect"
redirect="Domain"
ignoreCase="true" rewriteUrlParameter="IncludeQueryStringForRewrite"
virtualUrl="http://wehosting.mydomain.com(.*)"
redirectMode="Permanent"
destinationUrl="http://mydomain.com" />

Save the file and upload back onto your server. When you visit "http://wehosting.mydomain.com" you should now be redirect to "http://mydomain.com" immediately.

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Fill in the blank