129 Web Design is a Web Design, Web Development and Web Marketing firm based in Portland, Maine.
Checkout Our blog.  Discuss coding, random tech issues and off topic items. Login to your 129 portal.  The place to get information regarding web design, web development and web marketing services. Answers to common questions regarding our web design, web development and web marketing services.
Checkout our portfolio to see examples of web design, web development and web marketing. Checkout our services to learn more about web design, web development and web marketing. 129 Web Design is a Web Design, Web Development and Web Marketing firm based in Portland, Maine. See what's new in our world of web design, web development and web marketing. Contact us to learn more about our web design, web development and web marketing services. Have a question about our web design, web development and web marketing services?  Click here!

Search Engine Optimization and 301/Permanent Redirects

There are many reasons a web developer or web designer may need to use a redirect.  If you are permanently moving a page, always use a 301 redirect or a permanent redirect. 

What’s the difference between a 301 and a 302 redirect?

A 302 redirect is a “temporary” redirect and is the most commonly used redirect.   When a web developer or web designer uses one of the following methods to accomplish a redirect, a 302 or a temporary redirect is being used.

ASP.net (VB)

                Response.Redirect(“/somepage.html”)

ASP.net (C#)

                Response.Redirect(“/somepage.html”);

ASP

Response.Redirect(“/somepage.html”)

PHP

           Header( “Location: /somepage.html ” );

ColdFusion

                <cflocation url(“/somepage.html “>

HTML

<META  http-equiv=”refresh” content=”0;URL=/somepage.html ” />

JavaScript

                document.location.replace(“/somepage.html”);

These methods will redirect a user from page A to page B, but you are doing a huge disservice to your search engine marketing campaign, because you are basically telling search engines that the page has temporarily moved and it’s no big deal. 

Why use a 301 redirect

Using a 301 redirect tells search engines that the page is permanently being replaced by the page that is being redirected to and to pass along all search engine history.

To accomplish a 301 redirect in one of the aforementioned technologies, use one of the following methods:

ASP.net (VB)

Response.Status = “301 Moved Permanently”
Response.AddHeader(”Location”,”/somepage.html”)

ASP.net (C#)

Response.Status = “301 Moved Permanently”;
Response.AddHeader(”Location”,”/somepage.html”);

ASP

Response.Status=”301 Moved Permanently”
Response.AddHeader “Location”,”/somepage.html”

PHP

Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: /somepage.html” );

ColdFusion

<.cfheader statuscode=”301″ statustext=”Moved permanently”>
<.cfheader name=”Location” value=”/somepage.html”>

PERL - CGI Redirect

print $q->redirect(”/somepage.html”);

As you can see there isn’t a corresponding method to accomplish a 301 redirect in HTML and JavaScript, because it currently isn’t possible.  If you would like to accomplish a 301 redirect on pages that only employ HTML/JavaScript, take a look at 301 redirects using .htaccess and/or IIS.  Also note that 301 redirects are not foolproof.  Sometimes, search engines just won’t grab onto the 301 redirect and pass along all of the corresponding information.

Check out all of our articles on search engine optimization and .htaccess

Using the DirectoryIndex property in .htaccess to improve search engine optimization and web site manageability

URL Rewriting with .htaccess and Apache to boost Search Engine Optimization

URL Rewriting with IIS (Internet Information Services)

Search Engine Optimization and 301/Permanent Redirects

 

Leave a Reply


Portfolio | Services | Company | News | Contact | Site Map | F.A.Q. | RSS RSS / Subscribe | Current Promo | Partnerships | Privacy Policy | Terms & Conditions

129 Web Design & Marketing | PO Box 18207 | Portland, Maine 04112