|
List Info
Thread: Best HTTP Status Code for a Redirect to a Service Suspension Page
|
|
| Best HTTP Status Code for a Redirect to
a Service Suspension Page |
  Japan |
2007-03-27 03:44:47 |
Hi everybody,
We use a Squid Web Proxy Cache to forward suspended
customers (based on
IP) to a service suspension page if they haven't paid their
bill. If
they go to Google and are suspended they will receive a 301
Moved
Permanently and be forwarded to our page of damnation. This
is probably
not the best status code.
Problem is when it comes to choosing the most appropriate
HTTP response
code to send the client while keeping in mind that certain
automated
programs may be attempting to retrieve the resource (such as
IM clients,
SOAP, XML/RPC, etc).
What would the best status code be? I have narrowed down to
the following:
503: Service unavailable. Mainly used if the server is
overloaded or
undergoing maintenance. (This is strictly a server error.)
307: Temporary redirect (to content that is supposedly
available at a
different URI).
403: Forbidden. The server understands the request but is
refusing to
fulfil it. Authorisation will not help and the request
should not be
repeated.
So, which is best in this situation?
Regards,
--
_Damien Bezborodow_
Applications Programmer
_Koala Telecom Pty Ltd_
Software Development
465 Morphett Street
Adelaide, SA 5000
Australia
|
|
| Re: Best HTTP Status Code for a Redirect
to a Service Suspension Page |

|
2007-03-28 02:33:02 |
Since this is a temporary redirect and you don't want the
redirect URL
to be used for future requests I would suggest:
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.
AFAIK this is the standard code to use for this type of
redirect and it
is certainly in common use and well understood by most user
agents.
Cheers,
Nigel
Damien Bezborodow wrote:
>
> Hi everybody,
>
> We use a Squid Web Proxy Cache to forward suspended
customers (based on
> IP) to a service suspension page if they haven't paid
their bill. If
> they go to Google and are suspended they will receive a
301 Moved
> Permanently and be forwarded to our page of damnation.
This is probably
> not the best status code.
>
> Problem is when it comes to choosing the most
appropriate HTTP response
> code to send the client while keeping in mind that
certain automated
> programs may be attempting to retrieve the resource
(such as IM clients,
> SOAP, XML/RPC, etc).
>
> What would the best status code be? I have narrowed
down to the following:
>
> 503: Service unavailable. Mainly used if the server is
overloaded or
> undergoing maintenance. (This is strictly a server
error.)
>
> 307: Temporary redirect (to content that is supposedly
available at a
> different URI).
>
> 403: Forbidden. The server understands the request but
is refusing to
> fulfil it. Authorisation will not help and the request
should not be
> repeated.
>
> So, which is best in this situation?
>
> Regards,
>
|
|
| Re: Best HTTP Status Code for a Redirect
to a Service Suspension Page |

|
2007-03-28 07:11:12 |
Damien Bezborodow wrote:
> We use a Squid Web Proxy Cache to forward suspended
customers (based on
> IP) to a service suspension page if they haven't paid
their bill.
--cut--
> > 403: Forbidden. The server understands the request
but is refusing to
> > fulfil it. Authorisation will not help and the
request should not be
> > repeated.
I'd vote for 403 Forbidden.
The 300 series is to indicate a change although the content
is valid.
400-series errors generally indicate that the returned
content is not
what you were after in the first place.
Most proxy servers will return 403 if the user is not
authenticated.
This is essentially the case here since permissions have
been
suspended. The 403 error is often taken by clients to say
that there
is a real problem that should be reported, rather than 302
etc. which
would mean that the service itself has changed but probably
still
valid.
best regards,
Tom
|
|
| Re: Best HTTP Status Code for a Redirect
to a Service Suspension Page |

|
2007-03-28 12:55:31 |
|
On 3/28/07, Tom Molesworth < tetra604 gmail.com">tetra604 gmail.com> wrote:
I'd vote for 403 Forbidden.
The 300 series is to indicate a change although the content is valid. 400-series errors generally indicate that the returned content is not what you were after in the first place.
Most proxy servers will return 403 if the user is not authenticated. This is essentially the case here since permissions have been suspended. The 403 error is often taken by clients to say that there is a real problem that should be reported, rather than 302 etc. which
would mean that the service itself has changed but probably still valid.
I agree. From a search engine optimization standpoint, if you feed the search engine a 302, it will start indexing the suspended page, replacing the original content (causing you to lose your rankings). Whereas if you send it a 4xx error, it will keep the last found page in it's cache, and check back periodically to see if normal has been restored yet.
Granted SEO might not be your intention, however the SEO standards side of it does further support Tom's vote.
Good luck!
-- -Harry Maugans http://www.harrymaugans.com
|
| Re: Best HTTP Status Code for a Redirect
to a Service Suspension Page |
  Japan |
2007-03-28 19:42:13 |
Harry Maugans wrote:
> On 3/28/07, Tom Molesworth <tetra604 gmail.com> wrote:
>>
>> I'd vote for 403 Forbidden.
>>
>> The 300 series is to indicate a change although the
content is valid.
>> 400-series errors generally indicate that the
returned content is not
>> what you were after in the first place.
>>
>> Most proxy servers will return 403 if the user is
not authenticated.
>> This is essentially the case here since permissions
have been
>> suspended. The 403 error is often taken by clients
to say that there
>> is a real problem that should be reported, rather
than 302 etc. which
>> would mean that the service itself has changed but
probably still
>> valid.
>>
>
> I agree. From a search engine optimization standpoint,
if you feed the
> search engine a 302, it will start indexing the
suspended page, replacing
> the original content (causing you to lose your
rankings). Whereas if you
> send it a 4xx error, it will keep the last found page
in it's cache, and
> check back periodically to see if normal has been
restored yet.
>
> Granted SEO might not be your intention, however the
SEO standards side of
> it does further support Tom's vote.
>
> Good luck!
>
But anything other than a 3xx message would require the
proxy to serve
the actual "suspension notice" page, not forward
to it. It's just a
question of how well Squid will support this. Might be able
to implement
it as a custom error page.
Thanks, folks.
--
_Damien Bezborodow_
Applications Programmer
_Koala Telecom Pty Ltd_
Software Development
465 Morphett Street
Adelaide, SA 5000
Australia
|
|
[1-5]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|