Maintenance header for SEO with PHP
No need for a detailed explanation. When your website is under construction, tell search engines to come back later. That's where we need 503. Here is the codes:
header( ( $_SERVER['SERVER_PROTOCOL'] == 'HTTP/1.1' ? 'HTTP/1.1' : 'HTTP/1.0' ) . ' 503 Service Unavailable', true, 503 );
header( "Retry-After: 3600" );
3600 is the number of seconds for search engines to come back later.
Written by Ekrem Büyükkaya
Related protips
1 Response
If anyone want to be sure that Google respects 503 status code, you should check this link http://googlewebmastercentral.blogspot.com/2006/08/all-about-googlebot.html
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Php
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#