What Are HTTP Status Codes?
HTTP status codes are server responses to a client’s request. These codes indicate whether the request was successful or encountered an issue. Common codes include 200 (OK), 404 (Not Found), and 500 (Server Error).
What is a 410 Status Code?
A 410 status code, also known as “Gone,” informs clients that the requested resource has been permanently removed and will not be available again. Unlike a 404 code, which signals a resource could be missing temporarily, a 410 code confirms it’s gone for good.
When to Use a 410 Status Code
The 410 status code is ideal when:
- A page or resource is permanently deleted and no longer useful.
- A product has been discontinued, and there’s no replacement.
- A promotion or limited-time content has expired.
By issuing a 410 code, you ensure clients and search engines know the resource won’t return.
410 vs. 404: What’s the Difference?
- 404 (Not Found): The server cannot find the requested resource, but it may return in the future.
- 410 (Gone): The resource has been permanently removed with no intent to restore it.
Example of a 410 Status Code
You can implement a 410 status code in various server environments. Below are some examples:
Apache .htaccess
RewriteEngine On
RewriteRule ^old-page$ - [G,L]
Nginx
location /old-page {
return 410;
}
PHP
SEO Impact of a 410 Status Code
From an SEO perspective, using a 410 status code ensures search engines like Google remove the page from their index. This can be beneficial when cleaning up outdated content and maintaining a streamlined site structure. Search engines recognize that a 410 means a page is permanently gone and should not be crawled again.
How to Fix a 410 Status Code Error
If you encounter a 410 error on your website, here’s how to resolve it:
-
Check if the Resource is Permanently Removed: Verify that the page or file triggering the error is no longer needed. If it was removed by mistake, consider restoring it.
-
Redirect to a Relevant Page: If the resource is permanently gone, set up a 301 redirect to guide users to an alternative page.
-
Review Links: Ensure all internal and external links pointing to the deleted resource are updated or removed.
Code Example for a Redirect (Apache)
Redirect 301 /old-page /new-page
In this example, users who visit the deleted “old-page” will be directed to “new-page.”
- Update Your Sitemap: If the page is permanently gone, make sure it is removed from your XML sitemap and that search engines are notified accordingly.
By following these steps, you can address and fix 410 status code errors effectively.
SEO Audit
Jacob Kettner is the owner and CEO of First Rank Inc., a digital marketing agency based in Winnipeg, Manitoba. He currently sits on Manitoba Chamber of Commerce Small Business Advisor Council which assists people grow their small businesses in Manitoba.