开发者

HTTP status code for temporarily unavailable pages

开发者 https://www.devze.com 2023-02-04 09:11 出处:网络
I\'m redesigning my small business\' website. I will开发者_JAVA技巧 be putting up a temporarily \'under construction\' splash page. I know, I know... but it will be one in style, I hope. :)

I'm redesigning my small business' website. I will开发者_JAVA技巧 be putting up a temporarily 'under construction' splash page. I know, I know... but it will be one in style, I hope. :)

What, mostly for SEO purposes, is the best HTTP status code to dish out for the URLs that will be temporarily unavailable (the same URLs will have content again, after the new site is up).

Now, my website traffic is hardly of any importance, but as a webdeveloper I want this knowledge in my toolbox for possible future client projects. And what better way to test and experiment with this, now that I have a convenient 'reason' with my own website.

Here's a few I thought about:

503 looks appealing, but is in the category of server errors.

204 looks appealing as well, but I'd rather temporarily redirect to the splash page.

307 looks like the best choice, but I'm not entirely sure.

There are a few others as well. So I'm curious to hear your advice. Thanks


I disagree to the selected answer. I would use the 503 code.

According to the RFC for HTTP/1.1:

503 Service Unavailable

The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. The implication is that this is a temporary condition which will be alleviated after some delay.

Yes, it should be an error, because the expected page will not appear.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号