The 410 Status Code: What It Is and How to Fix It
When browsing the internet, users occasionally come across 400 status codes, which are errors that indicate something has gone wrong. For instance, the 400 status code indicates that a HyperText Transfer Protocol (HTTP) bad request has been made. This status code occurs because the server will not or cannot process a user’s request because of […]
Jan 20, 2023 | 11 min. read
When browsing the internet, users occasionally come across 400 status codes, which are errors that indicate something has gone wrong. For instance, the 400 status code indicates that a HyperText Transfer Protocol (HTTP) bad request has been made. This status code occurs because the server will not or cannot process a user’s request because of a perceived client error. This error could be the result of deceptive request routing or an invalid framing for a request message.
When you type in an URL incorrectly, you would likely see a 404 error, which states that the web page you want access to doesn’t exist. In the event that the page is deleted altogether, you could receive a less common “410 Gone” status code that makes it impossible to access the page in question.
There are several things you can do to correct the “410 Gone” error with your website. For instance, you could take a look through your site logs and make changes to your server that fix the problem. You could also troubleshoot the specific error through the client side by making sure that new plugins are uninstalled and recent updates are rolled back. In this guide, you’ll find out all you need to know about the 410 status code and how you can fix it.
What Is the “410 Gone” Error?
When a user clicks on any web page, the browser they’re using will send a request over to the server the website is hosted on. Once this request is processed, the server sends back the necessary site files, which results in the requested information being displayed to the user.
Even though the user doesn’t see this process taking place, the server also sends over a status code in the form of an HTTP header. This code indicates if the request has failed or is successful. The various types of status codes that can occur include:
- 100s – Informational requests
- 200s – Successful requests
- 300s – Redirects
- 400s – Client-side errors
- 500s – Server-side errors
When you see the “410 Gone” error, it means that the resource that the user wants to gain access to has, for some reason, been permanently deleted. The 410 error can be displayed in numerous ways, which include:
- 410 Gone
- Error 410
- HTTP Status 410
When you own a website, it’s highly recommended that you monitor all status codes and make sure to fix errors as they develop. In the event that a new visitor tries to enter your website but is greeted by a “410 Gone” error, you should know why this error has occurred.
What Causes the “410 Gone” Error?
There are several reasons why the “410 Gone” error can be displayed. While this status code is considered one of the 400 HTTP status codes, it doesn’t only exist as a client-side error, which means that it can occur on the server side as well.
If a user makes a mistake when they type in an URL, they might encounter a “404 Not Found” error. However a 410 error can take place if the resource has existed in the past but the server has been configured to return this code.
In the event that you’ve made some recent changes to the Content Management System (CMS) you use, it’s possible to accidentally trigger this status code. There are also times when adding new plugins, extensions, or updates to your database could result in this error showing up.
Keep in mind that the 410 error can be caused by improper server configuration as well. By searching through your log files to detect 410 redirects, you should be able to locate the source of the problem. This status code could also be intentional. When you run a limited-time promotion on your site, the page for this promotion will eventually become unavailable to users. If an individual enters the promotional link after the sale is over, they can be redirected to the “410 Gone” error.
The Difference Between the “410 Gone” and the “404 Not Found” Error
While the “404 Not Found” and “410 Gone” errors tell the user that the resource is unable to be sent, there are a few differences between these status codes.
The “404 Not Found” error occurs on a regular basis but is a temporary issue. Even though the resource doesn’t exist at the moment, it could be the result of too much traffic on the website or a similar problem that can be quickly resolved. If you enter the URL a few hours later, the issue could be fixed.
In comparison, the “410 Gone” error indicates that the page that’s been requested has been deleted permanently. If a search crawler finds this status code, it will immediately de-index the given link. This error can also tell other site owners to get rid of this link from their own content. While these errors can be placed intentionally, you should fix them if they occur on their own to avoid website performance problems.
Diagnosing 410 Gone errors
As mentioned previously, “410 Gone” errors can be client-side or server-side errors. The following details how to diagnose these issues.
A client-side issue is something that originates from the user as opposed to the server that your website is hosted on. There are two primary reasons that a client-side “410 Gone” error can occur, which include an incorrect URL and changes to the platform/application.
In most cases, the user entering an incorrect URL results in the 410 error. While inputting an incorrect URL typically leads to a “404 Not Found” error, the 410 error can pop up if the resource was present but the server was set to return the 410 code.
Platform or application changes occur when you’re using a CMS like Joomla or WordPress. Adding modules, upgrades, or plugins to the CMS can lead to unexpected issues that are difficult to plan for. If you’ve just recently made one of these changes and are now noticing a 410 error, think about reverting the changes you’ve made until you can identify why this problem has developed. Some modules and plugins require database verification when you uninstall them.
A server-side error can occur because of unwanted redirects. First, you should investigate your logs. The exact location of your log files depends on the server you’re using. Once you find these files, open them and search for 410 errors. You should then be given information about where the 410 error originated.
The next step is to check the configuration file for any unwanted redirects. In the event that you’re using Apache, you’ll be tasked with checking the server configuration file along with the .htaccess file. When using Nginx, make sure that you look through the nginx.conf file.
Once you enter these files, perform a search for “410”. If any results are displayed, try to find out what the redirect is doing. You might need to make modifications to the file or remove the redirect entirely.
How To Fix the “410 Gone” Error (2 Methods)
There are two distinct methods that are used to fixed “410 Gone” errors. The one you use depends on whether the error is a server-side error or a client-side error. Back up your website before troubleshooting.
Method 1: Investigating a Client-side “410 Gone” Error
The steps in this process involve:
- Checking the requested URL
- Rolling back recent updates
- Uninstalling extensions and plugins
Client-side errors are relatively easy to fix since you won’t need to edit any files. First, check the requested URL. If you’ve accidentally input the wrong URL, you may be given this code. Try reentering the address. If you continue to see the 410 status code, search for the specific site page by entering a few words into the Google search engine. From here, check if the link is still active.
If you get the “410 Gone” error no matter how you enter your website, you should roll back any of the recent updates you’ve made to older versions. It’s possible that newer tools resulted in unexpected issues.
If you have a previous version of your website backed up, restoring the old version should be simple. The CMS you use determines what steps need to be taken to restore an older version of your website. Once you’ve restored your website, check to see if you still get the “410 Gone” error. If so, additional steps should be taken.
The third step involves uninstalling plugins and extensions. If any plugin you’ve installed changes your redirects or URL structure, the 410 error could be displayed. Uninstalling these plugins may be enough to resolve the issue. Start by deactivating all plugins at once, which can be done from the “Plugins” page that’s found on your WordPress dashboard.
Method 2: Investigating a Server-side “410 Gone” Error
The steps involved with this method include:
- Review your website logs
- Debug your site
- Verify server configuration
If you’ve implemented all of the client-side fixes but find that the “410 Gone” error is still being displayed, it may be time to investigate it as a server-side error. The first step involves reviewing your site logs. You should be able to get to your website logs from your CMS dashboard.
Once you’ve entered the log viewer, choose access.log from the menu. You’ll then be able to view all HTTP requests for your site. Scan these requests for 410 errors to identify the pages that are currently down.
The second step of this process is to debug your website. You can do so with the Query Monitor plugin. This tool can be used to view performance of database queries, HTTP API calls, enqueued scripts, and PHP errors. Once this plugin has been downloaded and installed, you can monitor server-side HTTP requests by selecting “HTTP API Calls” in the dashboard.
If you find any errors, the third step is to verify your server configuration. Your site comes with a .htaccess file that includes rules about server configuration. If changes have been made to this file recently, the “410 Gone” error could be created. You’ll likely need to connect to your server to open site files, which can be done with a Secure File Transfer Protocol client. If you find any changes in the file as well as rules that consist of a “Redirect 410”, delete them.
Status codes can be displayed for any number of reasons. While “410 Gone” codes can be useful if you want users to know a site page is no longer active, they can be harmful if you didn’t intend to use them. The steps detailed above should help you fix any unexplained 410 status code you encounter.
Subscribe to our newsletter and get more awesome content like this article.