HTTP

Status Code

410 Gone

Learn what 410 Gone means and when resources are permanently removed. Understand the difference between 410 and 404, and SEO implications for deleted content.

4 min read beginner Try in Playground

What is a 410 Error?

TL;DR: 410 Gone means the resource was permanently deleted. Unlike 404, it will never come back.

A 410 Gone status code means the resource you requested used to exist but has been permanently removed and will never come back. Think of it like visiting a house that was demolished—you have the right address, but the building is gone forever and there’s no forwarding address.

Unlike a 404 error (which might mean you typed the wrong URL), a 410 explicitly tells you “this used to be here, but it’s intentionally gone forever.”

When Does This Happen?

You’ll see a 410 error in these common situations:

1. Deleted Blog Posts or Articles

Old URL:     /blog/outdated-post-2020
Status:      Permanently removed for being outdated
Response:    410 Gone

2. Discontinued Products

Old URL:     /products/discontinued-item
Status:      Product no longer sold
Response:    410 Gone

3. Expired Content

Old URL:     /events/conference-2020
Status:      Event is over, page removed
Response:    410 Gone

4. API Version Deprecation

Old URL:     /api/v1/users
Status:      API v1 permanently shut down
Response:    410 Gone

5. Legal or Policy Removal

Old URL:     /content/removed-for-policy
Status:      Content violated terms, permanently removed
Response:    410 Gone

Example Response

When a resource is permanently gone, the server responds like this:

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

{
  "error": "Gone",
  "message": "This resource has been permanently removed",
  "removed_at": "2024-01-15T10:30:00Z",
  "reason": "Content policy violation"
}
```text

Key parts of this response:

- **410 Gone** - The status code indicating permanent removal
- **Content-Type** - Format of the response body
- **Body** - Details about when and why it was removed
- **Metadata** - Optional info like removal date and reason

## Real-World Examples

**Example 1: Discontinued API Version**

```http
GET /api/v1/users HTTP/1.1
Host: api.example.com
Authorization: Bearer token123

Response:

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

{
  "error": "API version discontinued",
  "message": "API v1 was permanently shut down on 2024-01-01",
  "migration_guide": "https://docs.example.com/migrate-to-v2",
  "current_version": "/api/v2/users"
}
```text

**Example 2: Deleted Blog Post**

```http
GET /blog/old-post-2020 HTTP/1.1
Host: myblog.com

Response:

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

{
  "error": "Content removed",
  "message": "This blog post was permanently deleted",
  "removed_at": "2024-06-15T14:20:00Z",
  "reason": "Outdated information",
  "alternatives": ["/blog/updated-guide-2024"]
}
```nginx

## How to Handle 410 Errors

**As a User:**

- Accept that the content is permanently gone
- Look for alternative or updated content
- Check if there's a newer version available
- Remove bookmarks to the gone resource

**As a Developer:**

- Update any hardcoded links in your applications
- Remove references from sitemaps and navigation
- Implement proper 410 responses for deleted content
- Provide helpful alternatives in the response body

**As a Website Owner:**

- Use 410 instead of 404 for intentionally removed content
- Include removal date and reason in responses
- Suggest alternative resources when possible
- Keep 410 responses for a reasonable time before switching to 404

## 410 vs Other Similar Codes

| Code    | Meaning             | When to Use                                       |
| ------- | ------------------- | ------------------------------------------------- |
| **410** | Permanently gone    | Resource was intentionally removed forever        |
| **404** | Not found           | Resource doesn't exist (might never have existed) |
| **301** | Moved permanently   | Resource moved to a new location                  |
| **403** | Forbidden           | Resource exists but access is denied              |
| **503** | Service unavailable | Resource temporarily unavailable                  |

## When to Use 410 vs 404

**Use 410 Gone when:**

- You deliberately deleted content
- An API version was discontinued
- A product was permanently removed
- Content expired and won't return
- You want to be explicit about permanent removal

**Use 404 Not Found when:**

- The URL was never valid
- You're not sure if it existed before
- It's a typo or wrong URL
- You don't want to reveal that it once existed

## Common Implementation Patterns

**❌ Using 404 for deleted content**

```http
GET /blog/deleted-post
HTTP/1.1 404 Not Found
← Doesn't tell user it was intentionally removed

✅ Proper 410 for deleted content

GET /blog/deleted-post
HTTP/1.1 410 Gone
Content-Type: application/json

{
  "message": "This post was removed on 2024-01-15",
  "reason": "Outdated information",
  "alternative": "/blog/updated-guide"
}
```text

**❌ Permanent 410 responses**

```text
Keeping 410 responses forever
Database grows with deleted content metadata
```text

**✅ Lifecycle management**

```text
Month 1-6: Return 410 Gone with details
Month 6+: Switch to 404 Not Found
Clean up old deletion records

SEO and Search Engine Impact

410 Gone Benefits:

  • Search engines remove the URL faster than with 404
  • Clearly communicates intentional removal
  • Helps clean up search results more efficiently
  • Better for SEO than leaving broken 404s

Best Practices:

  • Use 410 for 6-12 months, then switch to 404
  • Include removal date in response
  • Suggest alternative content when possible
  • Update internal links to avoid 410s

Try It Yourself

Visit our request builder and try accessing removed content:

  1. Set method to GET
  2. Set path to /api/v1/deprecated
  3. Click Send request
  4. Notice the 410 response with migration information

Frequently Asked Questions

What does 410 Gone mean?

A 410 error means the resource existed before but has been permanently deleted and will not return. Unlike 404, it explicitly tells clients and search engines the content is intentionally gone forever.

What is the difference between 410 and 404?

410 means the resource was intentionally and permanently removed. 404 means the resource was not found and might exist later. Use 410 when you want search engines to remove the URL from their index faster.

Is 410 better for SEO than 404?

Yes, 410 tells search engines to deindex the URL faster than 404. Use 410 for deleted content you want removed from search results. Use 404 for pages that might return or never existed.

When should I use 410 instead of a redirect?

Use 410 when there is no replacement content to redirect to. If similar content exists elsewhere, use 301 redirect instead. 410 is for content that is truly gone with no alternative.

Keep Learning