410 Gone Error - What Does It Mean and How to Fix It
What Does a 410 Gone Error Mean?
A 410 Gone error occurs when a user tries to access an asset which no longer exists on the requested server. In order for a request to return a 410 Gone status, the resource must also have no forwarding address and be considered to be gone permanently. This is the key differentiator from a 404 Not Found in that with a 404 error, the server does not know if the resource may be available again in the future.
How You Might See a 410 Gone Error
There are a few different ways that you might see a 410 Gone Error. The following list outlines a few of these variations that you may see depending upon the web server that is being used. Although they are slightly different, each one means the same thing.
- 410 Gone
- Error 410
- HTTP Status 410
Diagnosing 410 Gone Errors
In some cases, 410 Gone errors might be intentional. As explained further below, this is true if a website is running a promotion for a limited time and once that time has expired the page can return a 410 Gone. However, not all 410 error cases are intentional nor are they the same. 4xx errors are categorized to be client error responses however this doesn’t necessarily mean that the issue is on the client side. Below we’ll explore some reasons for why 410 Gone errors may occur on both the client side as well as the server side.
- Wrong URL - One of the most common reasons why a 410 Gone error is returned due to a client-side issue is because of a wrong URL entered. Now, in many cases, a wrong URL will result in a 404 Not Found however, if there was a resource present at that URL during a given time and the server was configured to return a 410 status code for that resource, that is what the client will receive.
- Application or Platform Changes - Whether you’re using a popular CMS like WordPress or Joomla, or have a custom application built from the ground up, adding plugins, modules, or upgrades can result in unwanted changes. If you’ve experienced a 410 Gone error after doing any one of the aforementioned actions you should consider reverting any changes made until you can determine the cause of the issue. In the case of certain plugins/modules you may also need to verify your database to ensure that no changes were made to the database or any changes that were made were reverted once you uninstalled them.
- Investigate the Logs - The first thing to do on the server when receiving an unexpected HTTP status code is to check the logs. The location of your server’s log files will depend on which server you’re using: Nginx vs Apache, or any other. Open the log file and run a search for 410 errors, this should at least point you in the direction of where the error is originating from.
- 410 Gone Redirects - The second thing to check on the server side if you’re experiencing 410 Gone errors is the configuration file for unwanted redirects. If you’re using Apache then you’ll want to check both the apache server configuration file as well as the .htaccess file. If you’re using Nginx then you’ll need to check the nginx.conf file. Within these files do a search for “410” and see if anything comes up. If it does, you should take a closer look at what the redirect rule is actually doing. It may need to be modified in order to apply to only a specific page (if that is your intention) and can be removed entirely if not required.
When to Use a 410 Gone Instead of a 404 Not Found?
As a web developer, it’s important to know when to use a 410 Gone error instead of a 404 Not Found. Using the proper status code is beneficial for a couple of reasons:
- It lets users know that the resource no longer exists, therefore they should not try and access it again
- Googlebot treats each status code slightly differently.
If you’re the owner of a resource and decide to intentionally remove said resource from your origin server permanently, then a 410 error should be returned to any subsequent users trying to access it. This also tells any websites linking to the resource to remove it as a link as it is no longer applicable.
Additionally, according to Matt Cutts, Googlebot treats 404’s and 410’s slightly different. If Googlebot comes across a 404 status, it protects that page in the crawling system as if to say “perhaps this status was returned accidentally” and does not classify it as an error immediately. On the other hand, if Googlebot comes across a 410 status, it assumes that the webmaster has intentionally set the status for this resource to 410 and therefore Googlebot immediately classifies it as an error. Google does however periodically re-crawl pages/resources that have previously returned a 410 status just to check if anything has changed.
Therefore, if the resource exists somewhere else or may return in the future, use a 404. Otherwise, if you are certain that the resource will not make a re-appearance, you can use a 410.
410 Gone Status Example
To get a better understanding of when a 410 Gone status could be used, consider the following example. Let’s say a company is running a promotional, limited-time offer for a particular product. A page is created for that promotion which is valid for 30 days. However, once the 30 day promotion is over the page is taken down. If the company is sure that the same promotion will never be run again, they may use a 410 Gone status for that page. Therefore if any other website has linked to that page during the promotion period, any visitors will see that the page returns a 410 error, therefore the link should be removed.
410 Gone - In Summary
The 410 Gone status isn’t as commonly used as other 4xx status codes, however, it does have its uses. If you are going to use a 410 status on a particular resource/page, simply ensure that you want to permanently remove said page. Otherwise, if there is a possibility that the page will be available in the future, it is better to make use of the 404 status.