Search Engine Friendly Permanent Redirects

This article provides you knowledge about how to properly in seo redirect a web page by the help of an HTTP 301 status code and Location header. The 301 status code is utilized to indicate that a page has enduringly moved.

I. Redirects with Server Side Scripting

If you have a dynamically driven web site, you can implement SEO Company one or more of the following scripts, which depends on which scripting languages you utilize.
These parts of seo code are quite self-skill. They just give the suitable 301 response header and the location of the new page.

HTTP 301 Redirect in ASP-VBScript

Comprise the following ASP code at the top of each page:
<%@ Language=VBScript %>
<%
‘ Permanent redirection
Response.Status = “301 Moved Permanently”
Response.AddHeader “Location”, “http://domain/”
Response.End
%>

SEO – Friendly Permanent

Comprise the following PHP code at the top of each page:
<?php
// Permanent redirection
header(“HTTP/1.1 301 Moved Permanently”);
header(“Location: http://domain/”);
exit();
?>

HTTP 301 Redirect in ColdFusion

Comprise the following ColdFusion code at the top of each page:
<CFHEADER statuscode=”301″ statustext=”Moved Permanently”>
<CFHEADER name=”Location” value=”http://domain/”>

HTTP 301 Redirect in JSP/Java

Comprise the following Java code at the top of each page:
<%
response.setStatus (301);
response.setHeader (“Location”, “http://domain/”);
response.setHeader (“Connection”, “close”);
%>

HTTP 301 Redirect in Perl

Comprise the following Perl code at the top of each page:
#!/usr/bin/perl -w
use strict;
print “Status: 301 Moved Permanently\n”;
print “Location: http://somewhere/page.htm\n\n”;
exit;

II. Redirecting with .htaccess

If you are on a Microsoft Windows Server or an Apache/ Linux server which can run Apache modules, you can do your redirects with an .htaccess file.
The .htaccess file is an extremely powerful seo tool, but can wreak havoc on a site if not implemented correctly. Always save a backup of any existing .htaccess file before attempting any changes.

Redirection with mod_rewrite

The following lines redirect the client to a new location. In this case, a request for the file contact.php is sent to the file contact-us.php:
rewriteEngine on
rewriteRule ^contact\.php$ http://domain/contact-us.php [R=permanent,L]

SEO redirect a web page

The code below will direct the entire traffic that does not seo contain the in the URL to the same page, but now comprising seo the . And this will clean up the canonical localisation problem which happens when the version of your site gets indexed along with the version:
rewriteCond %{ HTTP_HOST} ^domain\.com$
rewriteRule ^.*$ http://domain%{REQUEST_URI} [R=permanent,L]

Redirect aliases of home page to the root website

Have you noticed in your log files that people are looking for index.htm or index.asp in your root folder? Instead of letting them get a 404 Not Found error, why not direct them to your root folder, without a filename:
rewriteRule ^index\.(php|html|htm|asp) http://domain/ [R=permanent,L]

III. SSL https to http

Have you get grave canonical localisation troubles when the secure https version of your site was fully indexed along side your http version? Condition which is your case, there is a way to redirect https for the bots, telling those bots not to index the https version.