views:

167

answers:

3

Hi,

I'm creating a bulletin board system, and now I'm implementing a 'delete topic' feature for admins. If someone opens the deleted topic, the server cannot find it, so it must be 404. On the other hand, the topic has existed sometime, so I must use 410. Implementing the 410 would require a new table called deleted_topics, and so would require more space. However, 410 I think is better for search engines. What do you think? Should I use 404 or 410?

404 Not found

The server has not found anything matching the Request-URI. No indication is given of whether the condition is temporary or permanent. The 410 (Gone) status code SHOULD be used if the server knows, through some internally configurable mechanism, that an old resource is permanently unavailable and has no forwarding address. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.

410 Gone

The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.

The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.

Thanks,

+3  A: 

I think the correct way to do this is by sending the 410 Gone for some time and after a few weeks/months to switch to 404 Not found. Of course, it is for you to decide if that is worth the amount of time and effort.

Best wishes,
Fabian

halfdan
This question is tagged SEO and that's not a good idea from an SEO viewpoint. See my answer.
allesklar
+2  A: 
Carl Smotricz
A 410 response is a good way to give a reason for why a resource is no longer available.
Gumbo
I've deleted my response as it clearly wasn't helping, but... Why would a search engine not remove a "301 Moved Permanently" page from its index?
Alohci
301 says, "this is not a working link but if you follow this redirect you get some kind of result anyway". A greedy crawler will take anything it can get its furry little claws on. 410 says, "nothing to see here, go away and stop bothering!" SE algorithms are the subject of much debate but it's reasonable to assume that the stronger message will be more likely to discourage the crawler.
Carl Smotricz
+1  A: 

Neither. Since you tagged your question 'SEO' I'm assuming you want the best SEO answer. If there are any backlinks (coming from outside sites) to your deleted topic all the 'link juice' will be lost with 404 and 410 status.

Instead you should definitely create some 301 redirects which point to the root of the site, the root of the forum, or a related category. You will thus preserve the link juice and you get to decide which pages of your site will benefit most.

allesklar
So the goal of providing correct and up to date information is at odds with the goal of generating lots of page views. This explains a lot of what's wrong with the Internet. * sigh *.
Carl Smotricz
@Carl. Yes it does. But lets face it, HTTP status codes are horribly broken all over the internet. Worrying about their purity ahead of practicality is pointless.
Alohci
That's exactly why I try to discourage people from inserting even more breakage into the 'net. Truth is good, lies are bad; it's that simple.
Carl Smotricz
It's that simple only in a fanatical, literal religious context. In real life you have to balance out truth and self interest. You just have to find where you stand in that balance but at least one should be educated about the options.
allesklar
And although it's true that the page is gone, it's also true that you want to redirect your users to a more useful place. If a store closes down they sometimes put a sign on the door for the closes similar store. That's a service to the users.
allesklar
Yes, and it's a service that can be suitably presented on a 410 page without deceiving the user.
Carl Smotricz