htaccess redirect – using redirect 301 and others

redirect 301

A redirect 301 instruction is an example of a htaccess redirect. 301 redirect is the most efficient and Search Engine Friendly method for webpage redirection using the file called “.htaccess” on Linux servers. It is easy to implement and the major bonus is it should preserve your search engine rankings for that a reduntant existing page. So if you have to change file names or move pages around into different directories, it is the safest option to use. The code “301” is interpreted as “moved permanently” by the search engines such as Google.

.htaccess file resides normally in your root directory. It may not be visible in some ftp clients but you need to establish whether it does exist as overwriting it could cause serious problems. In cpanel you can browse your root directory using the file manager. If no .htaccess file exists use notepad to create the file.

Examples of  htaccess redirect

Redirect 301 /oldpage.html http://www.mysite.com/newpage.html
Redirect 301 /oldpage2.html http://www.mysite.com/directory/

Other Uses of htaccess

This will catch any traffic on your old site and redirect it to your index page of your new site.

Redirect 301 / http://www.newsite.com/

Remember changes to your .htaccess file can have significant effects on the way pages are served up by your web server. So ALWAYS make a backup of your .htaccess file so that you can recover gracefully!

There are many other uses of redirects using other commands in the file – such as RewriteCond, RewriteCond and RewriteRule.

More Information:
Unix Redirect

Posted in SEO Advice

Leave a Reply

Your email address will not be published. Required fields are marked *

*