Hostwinds Blog
Search results for:
HTTP status codes are short messages sent by a server to inform your browser about the success or failure of its request. Among these, the 4xx series deals with client errors, and within this series, the 410 status code is specific to managing web content.
The 410 status code—or "410 Gone"—means that the requested resource has been permanently removed from the web server. Unlike the 404 status code (which indicates that a page might return), the 410 status code is a clear signal to both web browsers and search engines that the page is gone for good.
One of the most important things to understand about the 410 status code is that it tells search engines to stop crawling and indexing a page. Therefore, it should only be used if you are certain that a page is no longer relevant or doesn't present any value to your website.
While the 410 status code is useful, there are several situations where using other status codes would be more appropriate.
While both the 410 and 404 status codes indicate that a page is unavailable, they serve different purposes. The 404 status code suggests that the page might be temporarily unavailable, possibly due to a broken link or a typo in the URL. Search engines will continue to crawl these pages thinking they will return.
On the other hand, the 410 status code tells search engines and users that the page is permanently gone and not coming back. This distinction is very important for SEO, as using the wrong status code can lead to inefficient crawling and potential drops in search rankings.
Using the right code ensures that search engines handle your site correctly—404s might still be checked by crawlers, but 410s tell them to stop.
Setting up a 410 status code is straightforward. Let's look at how to do this using Apache and Nginx web servers. Implementing on other web servers should be similar.
Input the following command to your .htaccess file:
RewriteRule ^old-page$ - [L,R=410]
This tells the server that the URL 'old-page' is gone and should return a 410 status.
On an Nginx web server, the following command will go into the server block:
server {
listen 80;
server_name example.com;
location /old-page {
return 410;
}
location /another-removed-page {
return 410;
}
# Other locations and server settings...
}
In this configuration, requests made to '/old-page' and '/another-removed-page' will return a 410 status.
When used correctly, the 410 status code can be a great tool for site management and sending the right SEO signals – Search engines can focus on active, relevant pages, and you can maintain a clean, crawlable, and user-friendly site.
Written by Hostwinds Team / September 5, 2024