|
|
Search Engine Marketing Definitions
301 redirectIf you need your old web page to redirect to your new web page or you have to remove old content a 301 redirect is always recommended. Avoid using other redirects techniques because they are not search engine friendly!
If you just change a file name or delete a page, you my lose search engine rankings that were associated with the old page. By using a 301 redirect, you tell search engines and humans where to find the new page.
Web Page Redirects using 301 redirect
Here are a couple of 301 web page redirect solutions:
- Windows Active Server Pages
<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently" Response.AddHeader "Location", "www.newsite.com/index.html"
>
- Windows ASP .NET
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location"," www.newsite.com/index.html");
}
</script>
- 301 redirect via the IIS (Internet Information Server)
- Open domain.com site in Internet Services manager.
- Go to the properties of the domain.com site
- Go to the Home Directory tab:
- Change the option button "When connecting to this resource the content should come from" to "A redirection to a URL"
- Enter your full URL http://www.domain.com
- Check the checkbox that says "A permanent redirection for this resource"
- 301 redirect via Apache
A 301 redirect is implemented in the .htaccess file. Scroll down and create a new line that follows this example:
redirect 301 /old/old.htm http://www.domain.com/new.htm
- 301 redirect in PHP
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.domain.com/new.htm");
exit();
See also: http://www.aleksika.com/site-optimization/web-page-redirect/
|
|
|