6b0e8eb51e4f7ff284db370232c1ce552e9896def8eb686572

Open Multiple URL In Single Click

Thursday 1 March 2012

Search Engine Friendly Redirect 301

Search Engine friendly Server Side Redirection


301 redirect is the efficient and Search Engine Friendly method for webpage redirection. 
Use the bellow code to redirect your page with 301 redirection 
What Does 301 redirection Means? 
301 Redirection is one of the http status code which tell the browser that the current request has been permanently moved to a page. Where the page URL will be sent in response. In SEO it will help while changing the site name. Because when we change the site name / domain name the without loosing currently indexed webpages in search engine and google page rank we can point the current page with 301 redirection. 

The 301 Redirect code for Different Server side Language 

301 Redirect in PHP 
header( "HTTP/1.1 301 Moved Permanently" );//for specifying 301 status code in response

header( "Location: redirecting_url" );


301 Redirect in code for JSP and Servlet 
response.setStatus(301);

response.setHeader( "Location", "redirect_url" );

response.setHeader( "Connection", "close" );


301 Redirect in VB.net 



<%@ Language=VBScript %> 
<% 
Response.Status="301 Moved Permanently"  
Response.AddHeader "Location","redirecting_page" 
%> 
301 Redirect in ASP.net 



<script runat="server"> 
private void Page_Load(object sender, System.EventArgs e) 
{ 
Response.Status = "301 Moved Permanently"; 
Response.AddHeader("Location","redirecting_page"); 
} 
</script> 


301 Redirect in CGI PERL: 
$q = new CGI;

print $q->redirect("url_tobe_recirect");



301 Redirect in Ruby 
def old_action

headers["Status"] = "301 Moved Permanently"

redirect_to "redirecting page"

end 

No comments:

Post a Comment

ads