Support Centre

Configuring a 301 Redirect



Redirecting with a 301 redirect

For many reasons, including search engine optimisation, it is important to add 301 redirects for any old pages on your site which no longer exist. There are many ways that you can do this, dependent on the hosting platform that your site operates from, as well as your own preference on what you are comfortable using. There are a few examples below which will allow you to create 301 redirects no matter which platform you are working from.

Example for Apache and .htaccess

RedirectMatch 301 (.*)\.htm$$1.php

Example for PHP Redirect

"HTTP/1.1 301 Moved Permanently" );     
Header"Location:" );     

Example for ASP Redirect

<%@ Language=VBScript %>       
Response.Status="301 Moved Permanently"       
Response.AddHeader "Location",""       

Example for ASP.NET Redirect

<script runat="server">       
private void Page_Load(object sender, System.EventArgs e)       
Response.Status = "301 Moved Permanently";       

Rate This Article

How useful was this article?

Not useful A little useful Useful Very useful Everything I needed