410 Gone

HTTP 410 Gone 客戶端錯誤響應狀態碼錶明目標資源在源伺服器上不再可用,並且這種情況很可能是永久性的。410 響應預設是可快取的。

客戶端不應重複請求返回 410 響應的資源,網站所有者應刪除或替換返回此程式碼的連結。如果伺服器所有者不確定這種情況是暫時性的還是永久性的,則應使用 404 狀態碼。

狀態

http
410 Gone

示例

請求過時的資源

以下 GET 請求針對包含已失效促銷內容頁面

http
GET /promotions/summer-2023 HTTP/1.1
Host: example.com
http
HTTP/1.1 410 Gone
Content-Type: text/html
Content-Length: 212

<html lang="en-US">
  <head>
    <title>Promotion expired</title>
  </head>
  <body>
    <h1>Promotion expired</h1>
    <p>Promotion no longer active! See <a href="/offers">current offers</a>.</p>
  </body>
</html>

規範

規範
HTTP 語義
# status.410

另見