Forum Moderators: open

Message Too Old, No Replies

Recommended status code

for temporarily unavailable pages

         

Captaffy

11:18 pm on Jul 27, 2005 (gmt 0)

10+ Year Member



I am doing a research project that involves a server that may under certain circumstances not be able to deliver a requested document to certain clients. If I serve them a 404, and one of them happens to be a spider, would it then assume the document is gone and remove it from its index?
There is a temporary redirect, so I am wondering if there is some sort of temporarily not found.

I suppose I could temporarily redirect to a 404.

jatar_k

11:23 pm on Jul 27, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



>> under certain circumstances not be able to deliver a requested document to certain clients

then shouldn't you give them a temporary redirect (302) to another page?

"I am sorry but you cant view that doc at this time" kind of thing?

>> so I am wondering if there is some sort of temporarily not found

[w3.org...]

10.3.3 302 Found
The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.

The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s).

not found would be 404

Captaffy

11:43 pm on Jul 27, 2005 (gmt 0)

10+ Year Member




then shouldn't you give them a temporary redirect (302) to another page?

"I am sorry but you cant view that doc at this time" kind of thing?

I believe you're right. I was just hoping there was a status code instead, because minimizing the data sent to clients under these circumstances is key.

jatar_k

11:45 pm on Jul 27, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



well you could go through the whole list of status codes on that list and see ;)

Dijkgraaf

12:54 am on Jul 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is no need to do a temporary redirect to a 404.
If your server is correctly configured and a request is made for a page that it can't find, then it will do the redirect to the 404 page itself.
Spiders won't give up on getting a 404, they will try revisit the page for years afterwords.

encyclo

1:42 am on Jul 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



It depends rather on why the server would not be able to serve to document. You may want to use a "503 Service Unavailable" error instead of a 404 or 302, complete with a Retry-After header indicating when service is likely to be resumed.

jatar_k

1:55 am on Jul 28, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I knew somebody had read that list ;)

good call encyclo

Captaffy

3:55 am on Jul 28, 2005 (gmt 0)

10+ Year Member



Thanks encyclo, that's perfect.

And I did read the list... okay I admit it, only the 400 codes... :(