301 Redirect – How to Redirect Website or URL

301 Moved Permanently – 301 status code implies that all requests should be directed to the given URL. The request for a specific page will be permanently redirected to another page. 301 or permanent redirection is a search engine friendly redirection type. This redirection is required when you move your website to another URL or URL structure needs to be changed due to some reasons. Redirection is very important when you move your website to SSL (HTTPS) version. Read more about What is SSL and HTTPS and its Importance in SEO

Read More About Technical SEO

301 redirects

301 Redirection How to Redirect Website

Find tips and methods below to implement URL Redirection via code and htaccess redirect.

Redirect URLs in WordPress – You can easily redirect URLs in WordPress website easily with help of plugins. Find some handpicked best WordPress redirect plugins. You can redirect any page without any knowledge of coding.

IIS 301 Redirect
In IIS manager, right click on the file or folder you want to redirect
Select the radio option “a redirection to a URL”.
Enter the redirection page
Check “The exact url entered above” and the “A permanent redirection for this resource”
Click on ‘Apply’

ColdFusion 301 Redirect
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://example.org”>

PHP 301 Redirect
<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://example.org” );
?>

ASP 301 Redirect
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://example.org/”
%>

ASP .NET 301 Redirect
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://example.org”);
}
</script>

JSP (Java) 301 Redirect
<%
response.setStatus(301);
response.setHeader( “Location”, “http://example.org” );
response.setHeader( “Connection”, “close” );
%>