About this site

A simple internet marketing account from the weird and wonderful world wide web, with a bit of rage thrown in for good measure.

So you are a budding wedding photographer and you have a website, its a good website, nay, its a great website, and you’ve decided that you are going to optimise it for search engines and make your site more accessible, and more easy to crawl so that as many of your pages as possible will be indexed, and more people will find and appreciate your work. You have decided that your first port of call will be to rename all your files to make use of appropriate key phrases, but you have a problem.

You want to rename /portfolio.htm to /wedding-photographer-portfolio.htm but currently your indexed page in Google links to /portfolio.htm and if you delete this page, anyone who finds you in a search engine will simply be given a 404 (not found) error when they click on your site. You can’t leave the page in place and set the new one live as well, or the old page will never be un-indexed, and the new one will never be indexed for the first time because it has the same content.

So what do you do?

You use 301 Redirects.


What is a Redirect?

Redirects come in two main forms, a 302 redirect (temporary), or a 301 redirect (permanent). Essentially a redirect tells any traffic to the url you specify to move on to a new page, it ‘redirects’ it. (see how that works?).
In the case of a 301 redirect, users are automatically taken to the new page, whereas search engines are informed that this page has moved to a new location, and that they should re-index the new URL.

301.PNG


How do I use a 301 Redirect?

There are many ways of implementing 301 redirects, from using server side scripting (eg php headers), Meta Refresh headers, Javascript Redirects, Frame Redirects, Redirect Loops, or my personal preference, which is the server side scripting in the form of an .htaccess redirect (for Apache) and http.ini redirect (for ISAPI).

If you’re using a Linux based server then setting up a 301 redirect is probably a lot simpler than you might imagine.

  • Create a new blank file, and save it as .htaccess
  • Then in the first (or any) lines of the file write:

### 301 Redirects
Redirect 301 /oldpage.htm http://www.example.com/newpage.htm

The first line is simply a comment, so you can structure your .htaccess file when it’s getting full of things.

The second line consists of the following elements:

  • Redirect 301

Tells the server what type of rule this is

  • /oldpage.htm

Tells the server which page you are moving

  • http://www.example.com/newpage.htm

Tells the server where the page is being moved to


Considerations

It should be noted that in order to comply with HTTP web standards, the location of where the page is being moved to must be an absolute URI (ie. it must have http://www.example.com/newpage.htm - and not just /newpage.htm)
Some browsers will let this slide if you forget to do it, but others will display a warning message to the user.

That’s all!

So if you want to get cracking with renaming some of your files to make better use of key phrases but don’t want to lose your indexed pages in Google - you now have your solution! Get to work!

Got any nifty 301 Redirect tricks? Drop me a line in the comments!

One Response to “A Basic Introduction To 301 Redirects”

  1. [...] For example, mysite.com links to yoursite.com/you.htm but a few months later you decide that you want to change that page name to you-are-great.htm - you upload the new file, and delete the old one. The new url for that page is yoursite.com/you-are-great.htm - but I don’t know that, and neither do the 6 million other sites that are linking to that page, so you need to apply a 301 redirect to tell Google where to go. More on 301 redirects at a later date. [...]

    SEO Stat Packages Part 2 | EggRage.co.uk

Leave a Reply