Use 301 Redirect As Search Engine Friendly Method
Sometime we are moving our site to new site. It is possible that when we are making a copy to this new website, search engine will assume this new site publish duplicate content. This is not good for search engine optimization. So always use 301 Redirect method to avoid this condition.
There are some way to do 301 Redirect, such as :
- Using .htaccess file, write the following code on .htaccess located on your old site.Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.newdomain.com/$1 [R=301,L] - If using Ruby on Rail ( RoR ). Write this script on index page def old_action
headers["Status"] = “301 Moved Permanently”
redirect_to “http://www.new-url.com/”
end - If using perl. Write this script on index page
$q = new CGI;
print $q->redirect(”http://www.new-url.com/”); - If using JSP. The code would look like :
<%
response.setStatus(301);
response.setHeader( “Location”, “http://www.new-url.com/” );
response.setHeader( “Connection”, “close” );
%> - If using ASP.NET, use this script :
<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”http://www.new-url.com”);
}
</script> - If using ASP, use this script :
<%@ Language=VBScript %>
<%
Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”http://www.new-url.com/”
%> - If using PHP, use this script :
<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url.com” );
?> - If using Cold Fusion, the script is :
<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”http://www.new-url.com”>
Artikel terkait
- Content is king on Search Engine Optimization
Google is know all and see all. All indexed keyword is based on content of... - What Happens When I Submit my URL to a Search Engine?
One way to increase your visibility in internet is by submitting your site to a... - How to submit your blog or site to search engine
so first step to make our site is accessible through a user is by submiting... - What is the Difference between a Search Engine and a Directory?
I have mention that to promote our website, the best ways is by putting it...



very useful information. thank you !