410

Gone

Official
The ressouce is permanently unavailable and was probably deleted

General explanation of the 410 status code

The HTTP status code 410 Gone means the requested resource is no longer available on the server. It indicates that the resource was deliberately removed and will probably not be available again. This status code is used when a website is shut down or an API version is no longer supported. If a client receives a 410 Gone status code, it should assume the resource is no longer available and should not try to access it again.

Specification of the HTTP status code 410

The 410 Gone status code indicates that access to the target resource is no longer available at the origin server and that this condition is likely to be permanent. If the origin server does not

know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) ought to be used instead.

The 410 Gone response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer associated with the origin server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.

A 410 Gone response is cacheable by default; i.e., unless otherwise indicated by the method definition or explicit cache controls (see Section 4.2.2 of [RFC7234]).

Source / Quote by: The 410 Gone HTTP Status Code is specified by section 6.5.9 of RFC7231.

How to throw a 410 statuscode with PHP?

To throw the HTTP status code 410 on a web page, the PHP function http_response_code can be used. The syntax is as follows: http_response_code(410) (PHP 5 >= 5.4.0, PHP 7, PHP 8)

Test the 410 HTTP status code

In order to be able to display the HTTP status code (in this case 410 Gone) and other information on the client side, the development console must be opened with F12. Afterwards you have to navigate to the tab "Network". Now you can open the page, in the network tab you should see the web page (example index.php). This must be selected and then the Herder section must be selected. Here the user will see the following result:

Status code 410 Gone
Overview
URL: https://http-statuscode.com/errorCodeExample.php?code=410
Status: 410 Gone
Those: Network
IP address: XX.XX.XX.XX
Status code 410 Gone

How to create a custom error page for the 410 status code

Creating your own 410 Gone error page is relatively easy with the web server "Apache" as well as with the web server "NGINX".

Apache Webserver

The web server "Apache" is one of the most popular web servers on the Internet. To create an own 410 Gone error page in "Apache", the following change must be made in the following file.

File: .htaccess
ErrorDocument 410 /errors/410.html

NGINX Webserver

Similar to the web server "Apache", "NGINX" is also widely used on the Internet. To create your own 410 Gone error page in "NGINX", the following change must be made in the following file.

File: sites-enabled/default
error_page 410 /410.html;
location = /410.html {
    root /usr/share/nginx/html;
    internal;
}

Browser compatibility of the 410 status code

Chrome no data
Edge no data
Firefox no data
Opera no data
Safari no data
Chrome Android no data
Firefox for Android no data
Opera Android no data
Safari on iOS no data
Internet no data
WebView Android no data

Constants in programming languages

HttpStatusCode.Gone
http.StatusGone
Response::HTTP_GONE
httplib.GONE
http.client.GONE
http.HTTPStatus.GONE
:gone

Blog Articles

HTTP Status Codes: A Detailed Analysis of the 404 Not Found and 410 Gone Error Messages

HTTP status codes are an essential part of the Hypertext Transfer Protocol (HTTP), which is the basis for communication between web browsers and web servers. They allow the status of an HTTP reques...

Author: Tony Brüser
Author: Tony Brüser

Tony Brüser is an enthusiastic web developer with a penchant for HTTP status codes.

LinkedInGitHub