PHP 301 Redirects

Creating search engine friendly 301 redirects as part of your SEO initiatives is a great tip to keep under your belt.

If your website is powered by PHP, generating the redirect from the source code is probably your easiest and most efficient solution.

Search engines interpret the 301 code as meaning "moved permanently". In turn, PageRank/trust is passed from the old page to the new.

ShareThis

Example Code

header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.new-domain.com/or-page.html");

This code must be placed before other header() calls and before other data is sent to the browser.


blog comments powered by Disqus



Friends