301 Redirect – Page Permanently Moved

So what happens when you move, delete or rename a webpage? This may happen for a number of reasons:

  • You may have changed the structure of your website and have added new folders to better organise and define the structure or information architecture.
  • A page may be out-of-date and another page may be more appropriate

Example – You may have had a dedicated ‘News’ page – but after monitoring the traffic and finding a slow response it may be necessary to integrate your news feeds into your index/home page – in which case you would want all the engines to list the index/home page instead of the news page.

Why Does This Matter?

If your page is listed in a search engine index then once you move it, it’s good practice to let the search engine know that you’ve moved the page.

If nothing is done to tell the search engine that the page has moved, it will continue to list the old page and you may continue to receive visitors to a defunct page (404) and you may lose traffic.

So What Does The 301 Redirect Do?

Next time a search engine spiders your site it will read a file to let it know the status of the site and update its records accordingly, the old pages will be ignored and replaced by the new pages you specify. At the next update the old pages will be removed and the new pages listed in their place.

Similarly, if you visit a page with a 301 redirect you will end up at the new page.

Example – Watch your browser’s address bar when you go to https://www.22i.co.uk/main.htm – it will be redirected to the /index.htm page.

  • So How Do You Do This 301 Redirect?

The method described here works for Unix servers.

  • In the root folder of your website create or modify the .htaccess file.
  • The .htaccess file can be modified with a text editor such as notepad.exe
  • When you look at your .htaccess file there will be 3 elements to the command line – The command, the old page, the new page. So the line in the file will look something like…
Redirect 301 /oldpage.htm http://www.yourdomain.com/newpage.htm

Save your .htaccess file and upload it to the root of the server. To check that it is working you can use the Check server headers tool and input the URi of the old page.