As you learn more and more about search engine optimization there are all these terms and things you need to learn. Today we are going to learn about 301 redirects, what you use them for and why you need to use them. First of all you need to know what a 301 permanent redirect is.
What is a 301 Permanent Redirect?
A 301 permanent redirect is an instruction at the web server level indicating that something has moved/changed location. The instruction indicates the old location, the new location and that this move or change is permanent. The change can be a change in domain name, web page name, path to a web page on the site or to another site.
On a Linux server using Apache this instruction is in a file called the .htaccess file. The .htaccess file is placed in the root of the website or blog. The root would the folder that contains all your website/blog files, the one where the home page is. If you want to use the .htaccess file to record your 301 redirects your Apache installation also needs to have the mod_rewrite module enabled on your account.
When a page is requested by a browser or the search engine bot your web server will check the .htaccess file for any instructions regarding this page. If there are none, the request is processed as requested. When there is an 301 redirect instruction a message is sent back to the requesting party letting them know there is a change and the request is then processed as instructed.
Here is an example of the headers (message) sent back the visitor’s browser when they request a page that has moved to a new name:
HTTP/1.1 301 Moved Permanently =>
Date => Sat, 22 Jan 2011 07:28:23 GMT
Server => Apache
Location => http://www.htmlbasictutor.ca/clean-compliant-html-code.htm
Connection => close
Content-Type => text/html; charset=iso-8859-1
The search engine bots get this message also. They know to update their index (records).
Why Do I Need to Use 301 Redirects?
When things change on a website or blog and you do not have a 301 redirect instruction covering the change an few things can happen:
- If someone clicked a link on another site that points to a page that has now moved or is gone the visitor will get a 404 error page, indicating the web server cannot find the page. When you have done your own custom 404 error page complete with full navigation and a message about this page must have moved the person is still lost as to where they should go on your site for the information they wanted. With a 301 redirect instruction in place you can send them to the correct page or an alternative page if the page was deleted.
- A search engine bot is just like a visitor who has been directed to a page from a link within your site, from another site or from their records in their index. They need to know also that the page has removed or moved to a new location.
- Your page is listed in a search engine or a directory somewhere and that link you worked so hard for is now useless if you moved it without a 301 redirect. You need to keep that incoming link by including a 301 redirect instruction so you don’t loose the link. A directory editor might not take the time to find where you moved the page to and just delete the link.
When you redesign a website or blog with any changes to page names and/or location it is imperative that you do 301 permanent redirects so you do not have to start all over from scratch getting your new pages (possibly the whole site) reindexed in the search engines.
When to Use a 301 Permanent Redirect
The 301 redirect is a very useful tool to use.
Have Only One Version of Your Site Available
Have you ever noticed that for some sites you can access it typing www.domainname.com and domainname.com? This is the way the web hosting has been set up. You need to fix this so only one version of the website is available. Pick either the with www or without www version and redirect the other one to the one you chose. Make sure you always link to the version you chose also.
You may have heard of a canonical redirect. This is what they are talking about. Fixing 2 versions of the same thing.
Whether you believe that there is a duplicate content penalty from the search engines, the duplicate is just not shown in the search results or it is not something to worry about, think of it this way: Every link to a page is a vote for the page as in this is a good page. If half your votes are to www.domainname.com/mypage.htm and the other half are for domainname.com/mypage.htm for example you are diluting (spreading out) your links. Why do that? The more votes for a page the better so why not fix the problem with a 301 redirect so the one version of the domain (or page) gets all the votes? Makes senses to me.
You should really thing long and hard before changing your domain name. All that work you did to develop the original domain, the site and the associated branding with be for not unless you do extensive rebuilding of your presence on the web.
Should you decide that all that reworking is worth it, you should use a permenant redirect from the old domain name to the new one to keep your existing traffic and links following. It will also let the search engines know about the change.
Multiple Domain Names
Some people buy multiple versions of their domain name to protect their branding. i.e. stop someone buying another version of your domain name and stealing your thunder by mistaken identity possibly. You can either leave the extra domain names parked (just sitting there) at your domain registrar or you may decide to 301 permanently redirect one or all to the main domain name you intend to build up.
Whether it is an overhaul of your existing site using the same technology as it had originally or if you have decided to change the technology used to run your site you need to keep track of all changes and use 301 permanent redirects to point to the new format or new web page file names. Examples:
- Website Overhaul
You have come to realize that the set up of your site or blog is not too user friendly or it needed an overhaul for better search engine optimization. All the changes need to be covered with 301 redirects so you don’t loose what pages you have indexed in the search engines and those incoming links you don’t know about.
- Moving from One Technology to Another
You have a regular HTML site (static site) and you decided that having a content management system like WordPress would make it easier to maintain. That’s fine. WordPress uses a different url system than a static website. On a static website the web page names end with .htm or .html. When using WordPress the pages can be the same name but they end with a slash. Look at the url for this page. 301 redirects are needed to redirect the search bots and incoming links to the new format or you will be starting all over again.
A third example would an ecommerce site that has gotten too big to manually update so you have decided to go with an ecommerce software. Again that’s fine but ecommerce software generally uses PHP (or other) technology to communicate with the database that has your store information. The pages end with .php for one thing and sometimes if the programmig isn’t done to be search engine friendly after the .php there is coding to tell the database what info to import into the page. All your existing pages had .htm or .html. 301 permanent redirects need to be put in place to transfer the old naming convention to the new one.
Can’t I Use rel=”canonical”?
No. Below Bing’s Webmaster Central Blog explains:
This past week at a conference someone had a question and asked if they could use a rel=canonical in place of a 301. They argued that since the rel=canonical passes value similarly to a 301, it should do the trick.
The answer to the queston is…no. You should not use a rel=canonical in place of a 301 redirect. The rel=canonical is designed to help manage duplicate URL issues. It is not a true 301 signal to the engines, though it can pass value similar to the way a 301 does. Implementing a 301 redirect is tough to mess up. It either works or it does not, and when it does, it passes value. We recently enountered a website that had so botched implementing its rel=canonicals that it essentilly would lead to all of their pages, save one, being stripped of value and de-indexed over time.
PageRank and Redirects
Matt Cutts, Head of Google Spam Department and Eric Enge sat down for an interview. They discussed PageRank and redirects:
Eric Enge: Let’s talk a little bit about the impact on PageRank, crawling and indexing of some of the basic tools out there. Let’s start with our favorite 301 Redirects.
Matt Cutts: Typically, the 301 Redirect would pass PageRank. It can be a very useful tool to migrate between pages on a site, or even migrate between sites. Lots of people use it, and it seems to work relatively well, as its effects go into place pretty quickly. I used it myself when I tried going from mattcutts.com to dullest.com, and that transition went perfectly well. My own testing has shown that it’s been pretty successful. In fact, if you do site:dullest.com right now, I don’t get any pages. All the pages have migrated from dullest.com over to mattcutts.com. At least for me, the 301 does work the way that I would expect it to. All the pages of interest make it over to the new site if you are doing a page by page migration, so it can be a powerful tool in your arsenal.
Eric Enge: Let’s say you move from one domain to another and you write yourself a nice little statement that basically instructs the search engine and, any user agent on how to remap from one domain to the other. In a scenario like this, is there some loss in PageRank that can take place simply because the user who originally implemented a link to the site didn’t link to it on the new domain?
Matt Cutts: That’s a good question, and I am not 100 percent sure about the answer. I can certainly see how there could be some loss of PageRank. I am not 100 percent sure whether the crawling and indexing team has implemented that sort of natural PageRank decay, so I will have to go and check on that specific case. (Note: in a follow on email, Matt confirmed that this is in fact the case. There is some loss of PR through a 301).
Matt Cutts Interviewed by Eric Enge Published: March 14, 2010
Note that Mr. Cutts is quoted saying some PR is lost when using 301 redirects.
When you redirect something and are viewing the Google Toolbar (which is outdated as soon as it is published because your PR is constantly changing in the background) you may notice that the PR for the changed pages disappears. Don’t panic, it will come back visually in the next toolbar update but it’s still there in the background. Now whether the changes you made were a good choice or not as far as PR is concerned is not known until the public PR information is updated again.
301 Redirects Are a Useful Tool
301 permanent redirects can benefit your site or blog in a search engine optimization way and in a visitor way when used and used properly . They keep the information about your site up to date with the search engines and avoid you loosing incoming links and annoyed visitors. Use 301 redirects anytime you make a change to your website or blog.
Is there a limit to how many 301 (Permanent) redirects I can do on a site?
Matt Cutts answers the question on how many 301 permanent redirects is too many in the video below:
301 Redirects More Information
This article was created as part of the V7N 30 Day Blogging Challenge. Click the image below to see who else is participating.
Copyright © 2005 - 2016 Web Page Mistakes. All rights reserved.
6 Responses to 301 Redirects: What You Need to Know
301 Redirects: What You Need to Know Was Mentioned Here:
- 30 Day Blog Challenge
- Tweets that mention 301 Redirects: What You Need to Know -- Topsy.com
- How to hide page file in URL?
- domain.com vs www.domain.com
- Redirecting old URLs
- Creating a site from a keyword domain - but what about main company website?