Which HTTP header information status code should I send to the search engine when the website is offline for maintenance? Posted on November 27,200 9 by zhounaiming
Returning the correct HTTP header information status code to the search engine is the most basic Seo. If the page does not exist, 404 is returned. If a URL address is permanently redirected to another URL address, 301 is returned. When the website is offline for maintenance, which header status code should I return to the search engine?
I have read two articles very clearly and should return 503 service temporarily unavailable. Http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html. This article says: if the search engine returns 404 or 500 incorrectly during website maintenance, the PageRank of the indexed page is very likely to be lost. When returning the 503 status code to the crawler, you should also send the retry-after header information to the crawler to tell the crawler how long it will take to visit again. For example, retry-after: 3600 indicates that the search engine should be accessed in 3600 seconds. The address of another article cannot be found. The article also references a text in Google webmaster center to prove that 503 should be returned.
My instances
Not long ago, a small station I made went offline for a while, during which 503 was returned to the search engine. I logged on to the Google website administrator center today and found some robots.txt unreachable error messages in the crawl errorsbar. View the Google webmaster Center page about disabling Indexing in URL unreachable tables. If the index does not exist (404 is returned), Google determines that all pages are indexed. My website root directory does not contain robots.txt in the maintenance period, and my setting is that all addresses return 503. In this case, when the googelprobe detects that robots.txtexists, the code is 503state, And the robots.txt file unreachable (because it is neither 404 nor 200) stored by Google ). When the robots.txt file is unreachable, googlestops the indexing site. When the system detects the presence of robots.txtor detects the absence of robots.txt (404), it continues to index the website.
Conclusion
When the website is protected, 503 requests are sent to the search engine. At the same time, requests are sent to the Google detection engine when robots.txt exists.