Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HTTP status code for temporarily unavailable pages

I'm redesigning my small business' website. I will 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

like image 824
Decent Dabbler Avatar asked Jan 10 '11 01:01

Decent Dabbler


People also ask

What is HTTP status code 1xx?

A 1xx Informational status code means that the server has received the request and is continuing the process. A 1xx status code is purely temporary and is given while the request processing continues. For most tasks you won't encounter these much, as it's not the final response to the request. 100 Continue.

What does the HTTP status code 401 indicate?

The HyperText Transfer Protocol (HTTP) 401 Unauthorized response status code indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource.

What is status code 204 no content?

5 204 No Content. The server has fulfilled the request but does not need to return an entity-body, and might want to return updated metainformation. The response MAY include new or updated metainformation in the form of entity-headers, which if present SHOULD be associated with the requested variant.

What is 4xx status code?

4xx client error – the request contains bad syntax or cannot be fulfilled. 5xx server error – the server failed to fulfil an apparently valid request.


1 Answers

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.

like image 121
Jan K. S. Avatar answered Sep 27 '22 18:09

Jan K. S.