Hello guyz, I am moving my website and I expect some downtime. I dont want this downtime to affect my SERPs. Can you please tell me how do I send HTTP status codes through robots.txt? I am thinking of sending "503-Service unavailable, Retry after --- time". I know how to do it using PHP but I want a site-wide effect. Thank you -Rohan.
If you read a little about robots.txt, you will see that it is fo spiders and it can't send anything, it's just a file with information fo spiders in it. You can send status codes with PHP or other languages and .htaccess. In case you move your site i strongly recommend you to use silent redirect within a .htaccess file on your old server (in case if you have apache server of course). Like this, after you have copied all your files and database to the new server and did test you can redirect all trafic from the old one to the new with a silent redirect. When everithing works fine, then you can change or request the change in DNS to point your domain to the new server. Done