Sunday, August 25, 2019
301 Redirect - Page Permanently moved
So what happens when you move, delete or rename a webpage? This may happen for a number of reasons:
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 http://www.22i.co.uk/main.htm - it will be redirected to the /index.php page.
So how do you do this 301 redirect?
The method described here works for Unix servers.