When to Use a 301 vs. 302 Redirect

There are two types of redirects you can use, a 301 and a 302. These numbers refer to the HTTP Status Code returned by the server for a given URL. A 301 redirect tells the search engine that the page has moved permanently to the new URL. A 302 redirect tells the search engine that the move is only temporary, and you may decide to show content at the original location in the future without a redirect. 301 Redirects All three major search engines handle 301 redirects the same, that is to say they ignore the original URL and instead index the destination URL. 301 redirects can be very powerful when you redesign your site and the URLs change, move to a different domain, acquire a new domain, or implement a URL rewrite. In most cases, this is the type of redirect you want to use because you know exactly how the search engines will respond. 302 Redirects The three major engines handle 302 redirects very differently, and because of this 302s are typically not recommended. Google treats 302 redirects differently depending if they are on-domain or off-domain. An example of an on-domain redirect is athletics.mlb.com which uses a 302 redirect to http://oakland.athletics.mlb.com/index.jsp?c_id=oak. If you search for “oakland a’s” in Google you will see that athletics.mlb.com is displayed in the results because links point to that URL, which in turn uses a 302 redirect to the destination page. This is a great example where 302 redirects can be used effectively, since the shorter URL looks much more enticing in the results pages. Off-domain 302 redirects would be ripe for...

Redirecting Your Way Out of Google

Redirections are an essential part of any website’s SEO strategy. Whether or not you currently use a redirect on your website, you could be hurting your website’s standings with Google and risking a penalty. The fact is, there are times when using a redirect is absolutely essential to your website, and there are uses of redirects that can hurt your website as well. When a Redirect is Absolutely Necessary Website owners commonly make the mistake of not setting up a redirect when they move a page on their site or change the domain of their site. Failing to setup a redirect will not only cause confusion for visitors who try to access an old URL, but it can also confuse the search engines if proper instructions are not given to them. Your SEO company should be involved in correct this. What is a Redirect? A redirect is any method that automatically directs a user from one page to another. Common methods for redirecting users are Meta Refresh, Javascript Redirects, and 301 Redirects. Most website owners at one point or another will move a page, or even an entire site. It might be a slight move, such as changing the name of a directory or a file name. Or it may be a more significant change, such as converting your site from older HTML files to more modern PHP or ASP files. In some cases, the change may be drastic, changing the very structure and navigation of the website. In each of these examples, it is essential that you setup the proper redirection to avoid receiving a penalty from search...

How to do a 301 Redirect

301 permanent Redirect Redirects are essential for some websites. Without them pages don’t get indexed and that hurts your search engine visibility. The best way to do a redirect is to use a permanent 301 redirect. A permanent 301 redirect sends a status code to the browser alerting that the page has moved and a new page is taking its place-redirecting it permanently. Here are a few ways you can achieve a 301 redirect: Redirect from a subdomain to a domain It is important for SEO that all of your backlinks go to the same URL. Remember, www.bigoakinc.com, bigoakinc.com, www.bigoakinc.com/index.html and bigoakinc.com/index.html are all different pages to the search engines. We want all the PageRank funneling to one page. This can be helped with a 301 redirect to send browsers and bots who go to one of your home page variations. Modifying your .htaccess file that sends a 301 redirect status is where to start. Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com RewriteRule ^(.*)$ http://www.domain.com/$1 [R=permanent,L] If your host doesn’t allow mod_rewrite, you can use this code in an .htaccess file Redirect 301 http://domain.com/oldpage.html http://www.domain.com/newpage.html Code for various 301 redirects: PHP Redirect < ? header(‘HTTP/1.1 301 Moved Permanently’); header(‘Location: http://www.newdomain.com/newdir/newpage.htm’); exit(); ?> ASP Redirect <%@ Language=VBScript %> <% Response.Status=”301 Moved Permanently” Response.AddHeader “Location”, “http://www.newsite.com/newdir/newpage.asp” %> ASP.NET Redirect ColdFusion Redirect < .cfheader statuscode=”301″ statustext=”Moved permanently”> < .cfheader name=”Location” value=”http://www.new-url.com”> Please use the information responsibly and be sure this will be a 301 permanent redirect. Moving it again can upset the search...