Content Relocation and
HTTP Status Codes
One of the perks of PHP is that it abstracts away many low-level implementation details from the
web developer. It does such a great job, in fact, that you can typically build complex web applica-
tions without understanding much at all about the protocol web servers used to speak to the world,
Though most of the time this ignorance is bliss, it is sometimes not so with regard to search engine
optimization. Using the protocol improperly has the potential to wreak havoc for search engine rank-
ings. On the other hand, knowing how to use it effectively can be of great help to the very same end.
HTTP status codes are a small but critical part of this protocol. They provide information regard-
ing the state of an HTTP request. You can use them, for example, to indicate that the requested
information should be retrieved from a different location henceforth. In modern search engines,
doing so also may also result in a transference of link equity to that new location. This example
alone highlights the importance of knowing how to use these codes.
In this chapter you will:
Learn about the HTTP status codes that are pertinent to the search engine marketer.
Understand how to use the redirection status codes properly, how to signal deleted pages,
and how to avoid indexing errors.
Learn how to implement redirection using PHP and mod_rewrite.
Follow step-by-step exercises to implement automatic URL correction and canonicalization.
c04.qxd:c04 10:40 77