👻
410
Gone
!
?

Example HTTP Response

HTTP Response
HTTP/1.1 410 Gone
Content-Type: application/json

{"error": "Resource permanently deleted"}
Common Causes
  • Resource intentionally deleted
  • API endpoint retired
  • Content permanently removed
Technical Details

What does this mean?

Gone forever! Like a sandcastle washed away by the tide. It was here once, but now it's just... not.

Technical Definition

The content has been permanently deleted from server, with no forwarding address.

RFC Says

"The 410 (Gone) status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) ought to be used instead."

Plain English:

410 means 'This resource used to exist here, but it's been permanently removed.' It's like a tombstone for a resource. Unlike 404, 410 explicitly tells clients 'don't bother looking for this again - it's gone for good.'

Common Misinterpretation

Don't use 410 when you're not sure if the removal is permanent - use 404 instead. Use 410 for intentionally deleted resources (like removed user accounts, expired content, or deprecated API endpoints) to help clients clean up their caches and bookmarks.

Code Snippets

Ready-to-use code for returning this HTTP status in your application:

Node.js
// Express.js
app.get('/example', (req, res) => {
  res.status(410).json({
    error: 'Gone',
    message: 'Your error message here'
  });
});

// Native HTTP
const http = require('http');

http.createServer((req, res) => {
  res.writeHead(410, { 'Content-Type': 'application/json' });
  res.end(JSON.stringify({
    error: 'Gone',
    message: 'Your error message here'
  }));
}).listen(3000);
When to Use This Code
  • Resource was intentionally and permanently deleted
  • Want to inform clients to remove their references/links
  • Stronger signal than 404 - tells caches to purge
  • Use 404 if you're not sure or don't want to reveal deletion
Commonly Confused With