In going from one location on our website page Web access to it from other pages that link to get lost besides those who visit us from a search engine like Google will not find the page.
What we have to do is try to set up the page so that when the search engine robot know that the page has changed location permanently, for this we will use the 301 redirect, it should be noted that this state passes values PageRank for Google and the number of pages that link.
The 301 redirect is a state of the protocol standards HTTP , here are some ways to do it.
301 redirect with PHP
The redirect page we will replace it with a PHP file with the following code:
<? Php
header ("HTTP/1.1 301 Moved Permanently");
header ("location: http://www.neoideas.com.mx");
?>
It is important that this code is to the beginning of the php file (the first line).
301 redirect with ASP
The redirect page we will replace it with an ASP file with the following code:
<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.url-de-la-nueva-direccion.com"
%>
301 redirect with ASP.NET
The redirect page we will replace it with an ASP file with the following code:
private void Page_Load (object sender, System.EventArgs e)
{
Response.Status = "Moved Permanently";
Response.AddHeader ("Location, http://www.url-nueva.com");
}
301 redirect with ColdFusion
The page that we will redirect ColdFusion replaced by a file with the following code:
<. Cfheader statuscode = "301" statusText = "Moved permanently">
<. Cfheader name = "Location" value = "http://www.url-de-la-nueva-direccion.com">
301 redirect with Apache
You create a. Htaccess (if not, if you edit the current one) in your root directory and add the following line:
Redirect 301 / http://www.url-de-la-nueva-direccion.com
Redireción 301 on an IIS server
We need to configure the server by entering the Internet Services Manager as follows:
- Select the "redirection to a URL"
- Enter the page that will redirect
- Check the URL introduced as "a permanent redirection for this resource"
- Click "Apply"
301 redirect from an HTML
This type of redirection is not possible, it is necessary for any of the above methods or access server configuration.
Note that in all these forms of redirection http://www.url-de-la-nueva-direccion.com need to change the new URL.
0 comments:
Post a Comment