HTTP 410 Gone indicates the resource once existed at this URL but has been intentionally and permanently removed, with no forwarding address. Unlike 404 (which may be temporary), 410 is a definitive 'this content was deliberately deleted.' Search engines treat 410 more aggressively than 404 — they remove the URL from their index faster. Use 410 for content takedowns, expired promotions, and deleted user accounts.
Response includes the status code, standard headers (including Content-Type), and a small diagnostic JSON body describing the request and returned status.
Simulator URL (copy in the app after load — not a normal link):
https://httpstatus.com/api/status/410
Example request:
curl -i "https://httpstatus.com/api/status/410"The resource is no longer available and will not be available again (permanent). Unlike 404, 410 indicates the resource's absence is intentional and permanent.
On this code, Inspector focuses on semantics, headers, and correctness warnings that commonly affect clients and caches.
HTTP 410 Gone has specific technical implications for API design, caching, and client behavior. Understanding the precise semantics helps distinguish it from similar status codes and implement correct error handling. The response should include a descriptive body following a consistent error schema (like RFC 7807 Problem Details) so clients can programmatically handle the error.
// Handle 410 Gone in Express
app.use((err, req, res, next) => {
if (err.status === 410) {
return res.status(410).json({
type: 'https://api.example.com/errors/gone',
title: 'Gone',
status: 410,
detail: err.message
});
}
next(err);
});from fastapi import HTTPException
# Raise 410 Gone
raise HTTPException(
status_code=410,
detail={
'type': 'gone',
'message': 'Descriptive error for 410 Gone'
}
)// Spring Boot 410 Gone handling
@ExceptionHandler(CustomGoneException.class)
public ResponseEntity<ErrorResponse> handleGone(
CustomGoneException ex) {
return ResponseEntity.status(410)
.body(new ErrorResponse("Gone", ex.getMessage()));
}// Return 410 Gone
func errorHandler(w http.ResponseWriter, message string) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(410)
json.NewEncoder(w).Encode(map[string]any{
"status": 410,
"error": "Gone",
"message": message,
})
}