Skip to content

HTTP status code · Client errors (4xx)

410 Gone

410 Gone means the resource used to exist at this URL and the server owner removed it deliberately, with no plan to bring it back. You usually see it on expired promotions, deleted accounts or retired API versions.

Facts about this status code
Class4xx, Client errors
Defined inRFC 9110 §15.5.11
Cacheable by defaultYes, heuristically cacheable; a CDN can keep serving the 410 after you restore the page, unless you set Cache-Control
Safe to retryNo; the server is saying the resource was removed on purpose and will not return
Relevant headers
  • Cache-Control: decides how long browsers and CDNs remember the removal

What 410 means

RFC 9110, section 15.5.11, describes 410 as access to the resource being no longer available and the condition being likely permanent. The spec adds that it exists mainly for web maintenance: it tells whoever linked to the URL that the owners want those links removed. If the server cannot tell whether the removal is permanent, it should send 404 instead.

The difference from 404 is intent. A 404 admits nothing; a 410 states that removal was a decision. Google has said it treats the two almost identically, with 410 sometimes dropping the URL from the index a little sooner, so 410 is a clarity choice more than an SEO trick.

You do not have to keep a 410 forever. The RFC leaves it to the owner how long to mark something as gone; after a few months many sites let those URLs fall back to a plain 404.

When to use it

  • A limited-time campaign page, event page or coupon that has ended and has no successor page to redirect to.
  • A user deleted their account or profile and you do not want old links to suggest it might reappear.
  • An API version was shut down after its deprecation window: answer 410 with a body that points to the new version.

Common causes

If you are visiting the site

  • The link is to a sale, listing or event that the site took down once it ended.
  • The page belonged to a person or account that was removed from the site.

If you run the server

  • Someone added a 410 rule for a URL pattern that is broader than intended, for example every path under /blog/2019/ when only a few posts were removed.
  • A CMS or e-commerce platform returns 410 automatically for trashed or unpublished items; WordPress SEO plugins and Shopify apps commonly offer this.
  • An old API version was decommissioned and clients still call it.

How to fix it

If you are visiting the site

  • There is nothing to fix on your side: the owner removed the content on purpose. Search the site for a newer version of the same offer or article.
  • For the old content itself, try the Wayback Machine (web.archive.org).

If you run the server

  • If a close replacement exists, send a 301 to it instead of a 410; links and ranking signals then carry over.
  • If the 410 is a mistake, remove the rule and purge the CDN cache, because 410 is heuristically cacheable and may stick around.
  • For retired API versions, include a body that names the replacement endpoint, and consider a Sunset header (RFC 8594) on the old version before you switch it off.

How to send 410

Express (Node.js)
app.get('/promotions/:slug', (req, res) => {
  res.status(410).json({ error: 'This promotion ended on 2026-08-31' });
});
Next.js App Router route handler
// app/promotions/[slug]/route.ts
export async function GET() {
  return Response.json(
    { error: 'This promotion ended on 2026-08-31' },
    { status: 410 }
  );
}
Go net/http
mux.HandleFunc("GET /promotions/{slug}", func(w http.ResponseWriter, r *http.Request) {
	w.Header().Set("Content-Type", "application/json")
	w.WriteHeader(http.StatusGone) // 410
	w.Write([]byte(`{"error":"This promotion ended on 2026-08-31"}`))
})
Python FastAPI
from fastapi import FastAPI, HTTPException

app = FastAPI()

@app.get("/promotions/{slug}")
def get_promotion(slug: str):
    raise HTTPException(status_code=410, detail="This promotion ended on 2026-08-31")
Nginx
# One retired page
location = /black-friday-2025 {
  return 410;
}

# A whole retired section
location ^~ /api/v1/ {
  return 410;
}

Commonly confused with

410 vs 404
404 makes no claim about permanence; 410 asserts the removal was deliberate and final.
410 vs 301
301 sends the visitor to a replacement; use 410 only when there is no page worth redirecting to.

Frequently asked questions

Is 410 better than 404 for SEO?
Only slightly. Google treats both as signals to drop the URL; a 410 can make it happen a little faster because it is explicit. If the page had backlinks and a close replacement exists, a 301 redirect is better than either.
How long should I keep returning 410?
RFC 9110 leaves it to the server owner. A few months is enough for crawlers and most bookmarks to notice; after that, letting the URL fall back to 404 is fine.
Should a deleted API resource return 410?
Only if you keep a record that it existed. Most APIs return 404 after a hard delete because they no longer know the ID; 410 fits soft-deleted records and whole retired API versions.

Last reviewed by Arielton Oberek.