0

We have an annual christmas sale on this URL:

www.example.com /christmas-sale/

In February, when the sale is over, we no longer want the URL to be available. However we do want the URL to be available again in a year's time.

Is there a recommended protocol for dealing with a situation like this?

Should we be using a redirect? I figure not, because we are not specifying a new location for the same resource. The resource has become unavailable (if only temporarily).

Should we be using a 404? That doesn't seem like a good idea, because it will lead to a load of dead links from other websites. Ones that will be valid again next year.

unor
  • 92,415
  • 26
  • 211
  • 360
Martin Hansen Lennox
  • 2,837
  • 2
  • 23
  • 64
  • Maybe a 503 Service Unavailable? (Though I would hesitate to throw a server error for a page that's temporarily unavailable) – towr Feb 14 '14 at 14:39
  • Yeah that doesn't seem right to me... however I am at a loss as to what would be the 'right' response – Martin Hansen Lennox Feb 14 '14 at 14:52
  • possible duplicate of [HTTP status code for temporarily unavailable pages](http://stackoverflow.com/questions/4642923/http-status-code-for-temporarily-unavailable-pages), but really, why not put op a real page with 'Our Christmas sale will be available again at {insert date}', with a `200`? _Why_ should it be unavailable, if you can create a perfect teaser page on that url? ("leave your e-mail address if you want to be informed when our christmas sales starts", marketing loves that). – Wrikken Feb 15 '14 at 17:39
  • It's for a client. We will probably do something like that, but we haven't spoken yet and I wanted to know which options to offer. I wondered what the experts round here would do. – Martin Hansen Lennox Feb 16 '14 at 22:30

1 Answers1

0

Why don’t you add content on this page?

The next christmas sale starts 2014-12-01. Subscribe to our newsletter to get notified when …

That way, users can bookmark the sale URL in their browsers and re-visit it again (not possible if you’d redirect).

If you have to use a different status code than 200, I’d go with 404 (emphasis mine):

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent.

Of course you could still show content when using 404, so the page doesn’t have to be "dead". But again, I think you should just go with 200. The resource is still there, it just has a different function for your visitors.

Community
  • 1
  • 1
unor
  • 92,415
  • 26
  • 211
  • 360
  • Answers on the linked page (dupe question) would seem to recommend a 503, but I'm with you I'd go for a 404. Presuming there's a requirement for no content. – Martin Hansen Lennox Feb 16 '14 at 22:35
  • @MartinHansenLennox: Yeah, I think using [503](https://tools.ietf.org/html/rfc2616#section-10.5.4) would be wrong, as there is no "temporary overloading" or "maintenance" involved. – unor Feb 16 '14 at 22:41