views:

113

answers:

2

I have been asked by a client to return a 410 Status code for some URLs in a previous version of there site.

I have two options for how to programe this (based on constraints outside the scope of this request)

Option 1 this is easy to implement: use an existing old urls redirector (301 status code) to redirect all those urls to a single page, and have that page return an (410 status) code.

Option 2 harder to implement: write a feature to return the 410 status codes directly.

The question: will google(and others) do the right thing with option 1?

+1  A: 

You'll probably want to return the 410 directly, unless you are 100% there are no possible client connections made to the site which cannot correctly interpret the 301.

I would opt for the direct 410 to keep http integrity.

Jeremy B.
Jeremy, do you have any definitive source that says this chaining is bad?
StocksR
+1  A: 

I am pretty sure google will tag your page as 301 with option 1.

Option 2, even if harder feels much safer (but you already know that :))

Aurélien Bottazzini
Indeed, the original page gets a 301 redirect, which you should only use when the content has been moved (permanently), and after that a single page with 410. This is not the desired behaviour.
Marcel Korpel
Aurélien, do you have a link to a resourse that explains how google will handle this?
StocksR
@StocksR: this may be interesting to you: http://igoro.com/archive/what-really-happens-when-you-navigate-to-a-url/ (just replace Explorer by Google and the 200 code by 410).
Marcel Korpel