SEO Tips to Avoid Critical Mistakes - So what are server-side redirects anyway?
(Page 4 of 4 )
Now to server-side redirects. Using a command file called .htaccess, redirects can be smoothly added to avoid old and dead links. As the .htaccess file is checked before the browser loads the page, a few lines will redirect pages easily. A 301 error code is used on pages to indicate a moved page and 302 for temporarily moved pages. For a complete tutorial on using .htaccess, visit the Apache site at http://httpd.apache.org/docs/1.3/howto/htaccess.html. It is a nice walk through and will explain the process. In a nutshell, this will only work on a Linux server. Sorry, if the site is on a Windows server, these methods cannot be used, so refer to my paragraph above on redirecting if this is the case.
The .htaccess file needs to be uploaded in ASCII mode. This is true for other server-side scripts such as CGI and Perl. A nice free piece of software, and used by yours truly for some time, is FileZilla. It is straightforward to configure and has a great WYSIWYG style interface. Get it here: http://sourceforge.net/projects/filezilla.
Check with the server administrator that it is okay to proceed in this fashion. Or perhaps he or she would rather configure the .htaccess file. That would be expected if the site is being developed in-house. That administrator will know whether or not the .htaccess file already exists. Also, it may need to be renamed to htaccess.txt to upload and then have the name changed back to .htaccess later.
Redirect example and conclusion
Here is a quick example to illustrate how quickly this task can be performed. An example line in the .htaccess file to move a single page is:
Redirect 301 /yeoldelink.html http://www.somesite.com/newlink.html
The Apache tutorial at sourceforge.net will explain more in great detail. I may do a tutorial myself on the various applications for the .htaccess file in another article.
That concludes the article. It should be noted that in addition to the above techniques, please try to use proper grammar and spelling for the content. There is no use planning a keyword marketing strategy for the site if the keywords are misspelled. Check that thoroughly. Good luck optimizing!
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |