Sunday, November 16, 2008

Moving Pages on Your Server? - For SEO Use a 301 Redirect and .htaccess

Are you doing a major website redesign and moving some of your web pages around? A quick SEO (search engine optimization) tip you can use is to use a 301 redirect with htaccess to keep your page rank for that page. This kind of redirect will also make sure that the major search engines can still find your previously indexed content. Doing this will also ensure that the search engines can still find the pages with that have moved and should pass along your existing page rank.

Here is a good example of when I was ran up against this very problem. Recently I changed the location of some of the files on my website. I moved some of them into the old portfolio directory they were in to new and different location. Here is how I kept the search engines informed about this change.

Use you favorite text editor to create a file named .htaccess in the directory that contains your web pages. I use a program called pico on my server to do this, but any text editor should do the trick. If the .htaccess already exists then open it up and add this text to the bottom of the file:

redirect 301 /old-page.html http://www.yourserver.com/new-directory/new-file.html

Make sure to substitute your file names for "old-page.html" and "new-file.html", and edit your server name from "www.yourserver.com".

Depending on how often the search engines crawl your site your links should be updated to the the new location within a few days to a few weeks.

Daniel Catts is a web designer and web developer at http://www.dancatts.com

No comments: