Skip to main content
4xx Client Error

410 Gone

The resource requested is no longer available and will not be available again.

Meaning & Description

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. It is a stronger version of 404 Not Found, explicitly telling clients and search engines not to try again.

Common Causes

  • Intentional deletion of a webpage or API endpoint
  • Retiring of old API versions (v1 -> v2)
  • Removal of content due to DMCA takedown requests (though 451 is also used)
  • Archived products removed from an e-commerce catalog

How to fix a 410 error

  1. Accept that the resource is gone; update your client to stop requesting it.
  2. Check if the server provided a `Link` header or response body pointing to an alternative resource.
  3. Remove the dead link from your website or application code.

Browser & SEO Behaviour

Browser Behavior

Displays a generic error page, or renders the custom HTML provided by the server. Browsers will stop suggesting the URL in autocomplete over time.

SEO Impact

Extremely strong SEO signal. Googlebot and other crawlers will immediately remove the URL from their search index without waiting or retrying (unlike a 404 which they might retry for days).

CDN Behavior

Often cacheable. CDNs will cache the 410 response according to Cache-Control headers to offload requests to the origin.

Code Examples

Node.js (Express)
app.get('/api/v1/users', (req, res) => {
  // v1 API has been sunset
  res.status(410).json({ 
    error: 'Gone',
    message: 'The v1 API was retired on Jan 1st. Please use /api/v2/users.'
  });
});
Python (FastAPI)
from fastapi import FastAPI, HTTPException

app = FastAPI()

@app.get("/promotions/summer-sale-2022")
def get_old_promo():
    raise HTTPException(
        status_code=410, 
        detail="This promotion has permanently ended."
    )
Go (net/http)
func sunsetHandler(w http.ResponseWriter, r *http.Request) {
    http.Error(w, "Endpoint permanently removed", http.StatusGone)
}
C# (ASP.NET Core)
[HttpGet("old-feature")]
public IActionResult GetOldFeature()
{
    return StatusCode(410, new { Message = "Feature deprecated and removed." });
}
curl
curl -I https://api.example.com/v1/data
# Output: HTTP/1.1 410 Gone

Raw HTTP Response Example

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

{
  "error": "This documentation version has been permanently removed."
}

Real-world Examples

Google Search Console: Recommends returning 410 for URLs you want purged from the Google index immediately.
Twitter API: Returns 410 when attempting to use deprecated v1.1 endpoints that have been fully shut down.
Shopify: Returns 410 for deleted products to ensure search engines drop the dead link quickly.

Frequently Asked Questions

What is the difference between 404 and 410?

404 means "I can't find it right now, maybe try again later". 410 means "It used to be here, but I deleted it permanently, stop asking".

How does Google handle 410 Gone?

Googlebot treats 410 much more strictly than 404. It will immediately de-index the page and crawl it much less frequently, saving your crawl budget.

Should I use 301 Redirect or 410 Gone?

If you have a relevant new page that replaces the old one, use 301. If the content is completely gone and has no logical replacement, use 410.

Is 410 cacheable?

Yes, 410 is one of the few error codes that is cacheable by default. Proxies and CDNs will cache it to prevent the origin from being hit for dead resources.

Do I need to keep the 410 route forever?

No, eventually clients and crawlers will stop requesting the URL. After a few months, you can safely remove the route and let it fall back to a standard 404.

Did You Know?

Google's John Mueller has explicitly stated that for dropping pages from Google's index, 410 is marginally faster than 404.

Despite its usefulness, 410 is vastly underutilized by developers, who often default to 404 for everything.

Developer Tips

  • Use 410 instead of 404 for deleted user profiles, expired promotions, or sunset API versions to keep your server logs clean from constant bot retries.
  • Always provide a custom HTML page or JSON payload with the 410 response, ideally containing links to active resources or a new API version.
  • If you are maintaining an API, use 410 as the final stage of deprecation: Warn (headers) -> Deprecate -> 410 Gone.

Interview Questions

These are questions you might face in a backend or API design interview that touch on HTTP 410.

Why would you use a 410 status code instead of a 404?

I would use a 410 when I explicitly want to signal to clients and search engine crawlers that the resource was intentionally deleted and will never return. This prompts them to purge the link from their databases immediately.

Is a 410 Gone response cacheable?

Yes, unlike most 4xx errors, 410 is cacheable by default. This is because the state is considered permanent, so CDNs can safely cache the "gone" status to protect the origin server.

In an API lifecycle, when do you return a 410?

When an endpoint or entire API version has reached the end of its sunset period and is completely turned off.

Common Interview Mistakes

  • Thinking 404 and 410 do exactly the same thing.
  • Not knowing the SEO implications (immediate de-indexing vs delayed de-indexing).
  • Assuming it cannot be cached.