Question:
iam learning seo any one explain me 301 redirect please?
t.ramu
2010-10-05 07:26:18 UTC
301 explain how to st up 301 redirect problem
Four answers:
2010-10-06 03:24:43 UTC
301 Redirect



301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It's not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it's the safest option. The code "301" is interpreted as "moved permanently".

IIS Redirect



In internet services manager, right click on the file or folder you wish to redirect

Select the radio titled "a redirection to a URL".

Enter the redirection page

Check "The exact url entered above" and the "A permanent redirection for this resource"

Click on 'Apply'

ColdFusion Redirect



<.cfheader statuscode="301" statustext="Moved permanently">

<.cfheader name="Location" value="http://www.new-url.com">



PHP Redirect




Header( "HTTP/1.1 301 Moved Permanently" );

Header( "Location: http://www.new-url.com" );

?>



ASP Redirect



<%@ Language=VBScript %>

<%

Response.Status="301 Moved Permanently"

Response.AddHeader "Location","http://www.new-url.com/"

%>



ASP .NET Redirect







JSP (Java) Redirect



<%

response.setStatus(301);

response.setHeader( "Location", "http://www.new-url.com/" );

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

%>



CGI PERL Redirect



$q = new CGI;

print $q->redirect("http://www.new-url.com/");



Ruby on Rails Redirect



def old_action

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

redirect_to "http://www.new-url.com/"

end
Justice
2010-10-06 02:00:01 UTC
Sorry Colanth, a meta redirect isn't the same as a 301.



A 301 returns a message to Google saying "this page has moved permanently. Go to the new page instead and forget about this one".



Eg

site.com/page1.php

can 301 to

site.com/page2.php

Google will know that page2 should be treated the same as it did page1 (although it may not treat it exactly the same way).



You can do it using .htaccess or PHP code, or if you are on windows, using an ISAPI filter, code in your asp/asp.net page, or a few other ways.
2010-10-06 14:44:41 UTC
Looks like Pramod hit the nail on the head with this questions. I would however just like to add an point which, while it may be outside the initial scope of this question, may still interest people. According to Matt Cutts, 301 redrects don't actually pass all of the link juice!
2010-10-05 15:30:10 UTC
A 301 redirect isn't a problem. You "set it up" by







or by using a redirect in .htaccess if you're on an Apache server. http://www.webweaver.nu/html-tips/web-redirection.shtml has some examples.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...