Closed Incorrect status code on deleted pages/threads: 403 & 404 instead of 410

Alpha1

Well-known member
Licensed customer
Affected version
2.3.10
If you soft delete a thread or other content then it will load a no permissions page with 403 No Permission status.

If you hard delete a thread or other content then it will be completely removed from the system and the url will become a 404 Not found.

It seems to me that both approach are problematic for several reasons.
The content is deleted intentionally. It should not be a 403 No Permission or 404 Not Found error status, but 410 Gone.
The current approach seems logical from a software architectural viewpoint, but the result is messy.
While the occasional 404 for a deleted page on a average website may not be an issue, Forums delete a lot of pages.
Optimally we want our Google Search Console to have as few 404s as possible. We also want to be reliable in the sense that publicly available pages do not turn into 403 no permission pages en mass. This uncertainty may devalue publicly available pages.

410 status will remove the pages from Goole's index quickly and Google will not revisit the issue again. 403 pages however stay in GSE listing as errors and it seems that Google will occasionally recheck these. Eating up valuable crawl budget instead of indexing our real content.

All in all it would be a good idea to use the correct status codes so that Search Engines understand our content.
 
It definitely shouldn't be a 410 Gone for soft deleted, as once that's seen by Google it'll never index that URL again if it's undeleted.
 
Both approach have its up and downsides. If they are undeleted (which rarely happens compared to what stays deleted) then they are added back to the sitemap and google will reindex.
I have 22k 403 No permission pages in GSC for soft deleted threads. Some decades old. It seems to me that its better to get those out by telling Google the true status: Intentionally deleted / 410 Gone, then letting a mass of 403's give Google the wrong impression.
 
If they are undeleted (which rarely happens compared to what stays deleted) then they are added back to the sitemap and google will reindex.
It won't though - Gone means gone. Intentionally removed and not coming back, do not try again. So for hard delete sure, but not soft delete. Long standing soft deleted threads could be automatically hard deleted after a time, but the 410 should only be when they are permanently gone. Even if it is possible to resubmit it, it would be bad practice and not likely to reliably be re-indexed. Also XenForo couldn't just send a header for that, it would need to keep a record that a thread ID used to exist to differentiate it from one that never did, where a 404 would still be correct.

The bigger issue with it being a 403 on soft delete is it confirms the thread is still there, but it is I suppose the semantically correct response - the resource exists but you can't view it.

Ultimately with a site populated with user generated content there's going to be a lot of things like this that aren't as easy to control as a standard website.
 
Alpha1 is right.
They’re objectively not based on Mozilla.org


The HTTP 410 Gone client error responsestatus code indicates that the target resource is no longer available at the origin server and that this condition is likely to be permanent. A 410 response is cacheable by default.

Clients should not repeat requests for resources that return a 410 response, and website owners should remove or replace links that return this code. If server owners don't know whether this condition is temporary or permanent, a 404status code should be used instead.

QED soft deleting shouldn’t return a 410 as it is not known if it is temporary or permanent. A 404 may be better than a 403, but 410 should indicate permanent removal.

Either way, I’m pretty sure XF devs have answered this before and confirmed the current statuses are intentional and won’t change.
 
Automated triage: As designed

When guests open a soft-deleted thread or post, XenForo returns a 404 Not Found, not a no-permission page. Soft deletes can be undone, and permanently deleted content leaves no record to tell it apart from a page that never existed, so a 410 status isn't used. A change here would be best raised as a suggestion.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom