This article will guide you through the procedure of redirecting a web page properly, the search engine friendly way with HTTP 301 status in order to tell search engines that the page has permanently moved to a different location.
A while back, a client approached me in order to help her change the name of her business website. This consisted of changing the name on the logo, banners and other parts of the site. Additionally, she purchased a new domain name with several different TLDs. I immediately made the suggestion that we should redirect all the other domains to the .COM domain so that multiple domains could “run” on the same application.
Why not META refresh?
I started off the redirect with the META refresh method and realized that it wouldn’t be search engine friendly because of the fact that a page with a META refresh already has an HTTP 200 status and search engines wouldn’t be notified that the page has moved permanently. So META refresh is not the best proposition! But in case you wondered what it looked like, I made an example below. This code would go into the HEAD section of the page.
The code above will refresh to the specified URL immediately. You could change the “0″ to the number of seconds the page should wait before instructing the browser to redirect to the specified URL.
Doing it the search engine friendly way!
The proper way to redirect a web page is to use an HTTP 301 status header, telling the search engine bots/spiders that the page has moved permanently to a new location specified. You can do URL redirection in several different languages and methods. Below are several web page redirection examples.
Coldfusion Redirect
<.cfheader name="Location" value="http://www.domain.com">
PHP Redirect
ASP Redirect
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.domain.com/"
%>
ASP.NET Redirect
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "http://www.domain.com");
}
</script>
Java Redirect
response.setStatus(301);
response.setHeader("Location", "http://www.domain.com/");
response.setHeader("Connection", "close");
%>
PERL Redirect
Ruby On Rails Redirect
headers["Status"] = "301 Moved Permanently"
redirect_to "http://www.domain.com/"
end






October 25th, 2009 at 7:18 pm
Question 301 redirect are you using this within a domain? If you redirect from a site that is not relevant too you new site how will Google view that?