Thursday, January 17, 2008

Changing structure of your website and hyperlink anchors? Here is what you can do to avoid loss of traffic

For many webmasters, HTML is the first thing they learn when they want to start a website. On a fine day, he is introduced to the superior powers of PHP and other programming languages. Managing a PHP-MySQL powered website is very easy compared to those ever static HTML webpages(ofcourse only if you know PHP at very least)

So when you throw your energies for an upgrade to PHP powered webpages, you realize that this means changing file names. So it is possible that www.yoursite.com/this-is-a-webpage.html is no longer available or is better available at www.yoursite.com/this-is-a-webpage.php.

While it may be easy for you to cope with filename changes, it isn't the case with your visitors who come to your site following a hyperlink from some other webpage, or bookmarks, or search engines, etc. You may change the links on your webpages to suit the new filenames but it would be difficult to manage if you have published your links on many other external webpages and search engines. So your visitors would end up seeing Error 404: File not found and get irritated, and needles to say, they would leave you site!

To solve this, follow these simple 4 steps:
1. Once the upgrade is complete, use permanent redirects(301) to send visitors and crawlers to new location when they request the old location of the file. To confirm that redirection is working, simply type in the old location of the file and you will find it redirecting to the new location.
2. Generate a new sitemap. Sitemaps will be usually be available in multiple formats but lets use XML and HTML formats for this tutorial.
3. Submit the XML sitemap to Google(I assume you are using Google Webmaster Tools).
4. Edit your custom Error 404 (file not found) page and replace it with the new sitemap in HTML format. You could add a small note reading out "Dear visitor, we recentely upgraded and have renamed files in the process. The file you requested could not be found. We have listed all the webpages on this website. Please choose the page you were looking for."

Now, you can sit back and admire your upgraded website without fear of losing any traffic.

No comments: