How to create a PHP 301 Redirect

301 Redirect

301 redirect is by far THE most efficient search engine friendly method to redirect a web page while preserving your “Google Juice” also known as Google Authority.

When to use a 301 redirect?

  • Change of domain name
  • changed file names
  • moved pages around or renamed

301 Redirect is interpreted as “moved permanently” and tells the search engines that the specified website, page  or file has moved to a new  location.

Though we recommend .htaccess 301 redirects here is an example of a PHP 301 Redirect which can serve as a healthy alternative.

301 redirect is the most efficient and Search Engine Friendly method for webpage redirection. It’s not that hard to implement and it should preserve your search engine rankings for that particular page. If you have to change file names or move pages around, it’s the safest option. The code “301″ is interpreted as “moved permanently”.

Php redirect

<?
Header( “HTTP/1.1 301 Moved Permanently” );
Header( “Location: http://www.new-url-or-website.com” );
?>

Leave a Comment