# Return something else than a 404 for deleted subjects

**URL:** https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677
**Category:** Feature
**Created:** [August 29, 2015, 10:06am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677 "2015-08-29T10:06:11Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)
#### Post date: [August 29, 2015, 10:06am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/1 "2015-08-29T10:06:11Z")

</div>

Hi,

What do you think about returning something else than a 404 for the deleted subjects ?  
I’ve regularly some errors in Google Webmaster Tools when I delete some subjects. Could you send an other error code to indicate the page has been removed?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 29, 2015, 11:12am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/2 "2015-08-29T11:12:09Z")

</div>

What do you mean by hidden subjects? Can you be specific and give an example?

---

<div class="post-metadata">

### Author: ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)
#### Post date: [August 29, 2015, 11:33am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/3 "2015-08-29T11:33:43Z")

</div>

For example this page: [https://forum.pragmaticentrepreneurs.com/t/enquete-pour-un-projet-dentreprise/3579](https://forum.pragmaticentrepreneurs.com/t/enquete-pour-un-projet-dentreprise/3579) (it returns a 404 currently)

Here is what it looks when you are an admin:

 ![](https://global.discourse-cdn.com/meta/original/3X/f/5/f561a5e5fc0e2487bb5e9093d749f04b7a20330e.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 29, 2015, 11:34am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/4 "2015-08-29T11:34:27Z")

</div>

It looks deleted, not just unlisted. That’s why the body content is that pink color – that means deleted.

---

<div class="post-metadata">

### Author: ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)
#### Post date: [August 29, 2015, 11:35am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/5 "2015-08-29T11:35:40Z")

</div>

Yes sorry.  
But is it a good idea to send a 404 in this case?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 29, 2015, 11:36am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/6 "2015-08-29T11:36:28Z")

</div>

Uh, yeah, since it is deleted.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [August 29, 2015, 11:39am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/7 "2015-08-29T11:39:13Z")

</div>

Completely correct, when you delete a file from a web server you get a 404, this is exactly the same thing conceptually

---

<div class="post-metadata">

### Author: ![CamilleRoux](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/camilleroux/32/119575_2.png) [@CamilleRoux](https://meta.discourse.org/u/CamilleRoux)
#### Post date: [August 29, 2015, 11:40am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/8 "2015-08-29T11:40:34Z")

</div>

Why not using a `410 Gone` ?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [August 29, 2015, 11:43am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/9 "2015-08-29T11:43:43Z")

</div>

What difference does it make? How does that help anyone? What purpose would such a change serve?

---

<div class="post-metadata">

### Author: ![omfg](https://avatars.discourse-cdn.com/v4/letter/o/5e9695/32.png) [@omfg](https://meta.discourse.org/u/omfg)
#### Post date: [August 29, 2015, 1:43pm UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/10 "2015-08-29T13:43:20Z")

</div>

> [@codinghorror](#):
>
> What difference does it make? How does that help anyone? What purpose would such a change serve?

`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`

> **[HTTP/1.1: Status Code Definitions](https://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html)**

---

<div class="post-metadata">

### Author: ![downey](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/downey/32/166878_2.png) [@downey](https://meta.discourse.org/u/downey)
#### Post date: [August 31, 2015, 5:28am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/11 "2015-08-31T05:28:43Z")

</div>

Cutts:

> “If a page is gone and you think it’s temporary, go ahead and use a 404. If the page is gone and you know no other page that should substitute for it, you don’t have anywhere else that you should point to, and you know that that page is going to be gone never come back, then go ahead and serve a 410.”

> **[Matt Cutts on How Google Handles 404 & 410 Status Codes – Search Engine Watch](https://searchenginewatch.com/2014/04/18/matt-cutts-on-how-google-handles-404-410-status-codes/)**

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [September 18, 2015, 6:53am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/12 "2015-09-18T06:53:27Z")

</div>

We are re-evaluating this in the light of some 403 problems, I think I am conviced 410 gone is more correct for public deleted topics.. @riking will be working on it.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [September 18, 2015, 7:25am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/13 "2015-09-18T07:25:06Z")

</div>

That change is in:

[https://github.com/discourse/discourse/pull/3785/](https://github.com/discourse/discourse/pull/3785/)

This snippet is what error codes we’re currently giving out:

> <https://github.com/discourse/discourse/blob/c9e4745fe8081430079c25edbba0b5211dd9a28c/spec/controllers/topics_controller_spec.rb#L595-L636>

The “private (message) topic → 302” seems a bit weird, especially since we give a 403 (same as secure category) for signed-in users.

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:36am UTC](https://meta.discourse.org/t/return-something-else-than-a-404-for-deleted-subjects/32677/14 "2025-12-04T11:36:58Z")

</div>


