Markdown

HTTPステータスコード - Markdown

HTTPステータスコードは、Webサーバーがクライアントからのリクエストに対して返す3桁の数値コードで、リクエストの処理結果を示します。IANA(Internet Assigned Numbers Authority)が管理するレジストリで定義され、1xx(情報)、2xx(成功)、3xx(リダイレクト)、4xx(クライアントエラー)、5xx(サーバーエラー)の5つのカテゴリに分類されます。このコードはWeb開発やAPI設計において不可欠な要素であり、適切なエラーハンドリングやデバッグに活用されています。

HTTP Web インターネット プロトコル ステータスコード RFC
| code | slug | name | description | category | reference |
| --- | --- | --- | --- | --- | --- |
| 100 | continue | Continue | リクエストの初期部分が受信され、クライアントは続行すべきことを示します。 | 1xx 情報 | RFC 9110, Section 15.2.1 |
| 101 | switching-protocols | Switching Protocols | サーバーがプロトコルの切り替えに同意したことを示します。 | 1xx 情報 | RFC 9110, Section 15.2.2 |
| 102 | processing | Processing | サーバーがリクエストを受信し、処理中であることを示します。 | 1xx 情報 | RFC 2518 |
| 103 | early-hints | Early Hints | 最終レスポンスの前にリンクヘッダーを事前送信するために使用されます。 | 1xx 情報 | RFC 8297 |
| 104 | upload-resumption-supported | Upload Resumption Supported | サーバーがアップロード再開をサポートしていることを示します(暫定登録)。 | 1xx 情報 | draft-ietf-httpbis-resumable-upload-05 |
| 200 | ok | OK | リクエストが成功したことを示す標準的なレスポンスです。 | 2xx 成功 | RFC 9110, Section 15.3.1 |
| 201 | created | Created | リクエストが成功し、新しいリソースが作成されたことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.2 |
| 202 | accepted | Accepted | リクエストが受理されたが、処理が完了していないことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.3 |
| 203 | non-authoritative-information | Non-Authoritative Information | 返されたメタ情報がオリジンサーバーからのものではないことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.4 |
| 204 | no-content | No Content | サーバーがリクエストを正常に処理したが、コンテンツを返さないことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.5 |
| 205 | reset-content | Reset Content | クライアントがドキュメントビューをリセットすべきことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.6 |
| 206 | partial-content | Partial Content | サーバーがリソースの部分的なリクエストを処理したことを示します。 | 2xx 成功 | RFC 9110, Section 15.3.7 |
| 207 | multi-status | Multi-Status | 複数のリソースに対する複数のステータスコードを含むレスポンスです。 | 2xx 成功 | RFC 4918 |
| 208 | already-reported | Already Reported | DAVバインディングの要素が既に報告されていることを示します。 | 2xx 成功 | RFC 5842 |
| 226 | im-used | IM Used | サーバーがリソースに対するGETリクエストを処理し、インスタンス操作が適用されたことを示します。 | 2xx 成功 | RFC 3229 |
| 300 | multiple-choices | Multiple Choices | リクエストに対して複数の選択肢があることを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.1 |
| 301 | moved-permanently | Moved Permanently | リソースが永久に新しいURIに移動したことを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.2 |
| 302 | found | Found | リソースが一時的に異なるURIに存在することを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.3 |
| 303 | see-other | See Other | レスポンスが異なるURIで見つけられることを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.4 |
| 304 | not-modified | Not Modified | リソースが最後のリクエスト以降変更されていないことを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.5 |
| 305 | use-proxy | Use Proxy | リクエストされたリソースはプロキシ経由でアクセスする必要があります。 | 3xx リダイレクト | RFC 9110, Section 15.4.6 |
| 306 | unused | (Unused) | このステータスコードは現在使用されていません。 | 3xx リダイレクト | RFC 9110, Section 15.4.7 |
| 307 | temporary-redirect | Temporary Redirect | リクエストを異なるURIで繰り返すべきことを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.8 |
| 308 | permanent-redirect | Permanent Redirect | リソースが永久に新しいURIに移動し、リクエストメソッドを維持すべきことを示します。 | 3xx リダイレクト | RFC 9110, Section 15.4.9 |
| 400 | bad-request | Bad Request | サーバーが不正なリクエストを理解できないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.1 |
| 401 | unauthorized | Unauthorized | リソースへのアクセスに認証が必要であることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.2 |
| 402 | payment-required | Payment Required | 将来の使用のために予約されたステータスコードです。 | 4xx クライアントエラー | RFC 9110, Section 15.5.3 |
| 403 | forbidden | Forbidden | サーバーがリクエストを拒否したことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.4 |
| 404 | not-found | Not Found | サーバーが要求されたリソースを見つけられなかったことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.5 |
| 405 | method-not-allowed | Method Not Allowed | リクエストメソッドがターゲットリソースでサポートされていないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.6 |
| 406 | not-acceptable | Not Acceptable | リクエストのAcceptヘッダーを満たすコンテンツがないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.7 |
| 407 | proxy-authentication-required | Proxy Authentication Required | クライアントがプロキシで認証する必要があることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.8 |
| 408 | request-timeout | Request Timeout | サーバーがクライアントからのリクエストを待つ間にタイムアウトしたことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.9 |
| 409 | conflict | Conflict | リクエストがリソースの現在の状態と競合していることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.10 |
| 410 | gone | Gone | リクエストされたリソースが永久に利用できないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.11 |
| 411 | length-required | Length Required | リクエストにContent-Lengthヘッダーが必要であることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.12 |
| 412 | precondition-failed | Precondition Failed | リクエストヘッダーの前提条件が満たされなかったことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.13 |
| 413 | content-too-large | Content Too Large | リクエストエンティティがサーバーの許容サイズを超えていることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.14 |
| 414 | uri-too-long | URI Too Long | リクエストURIがサーバーの許容長さを超えていることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.15 |
| 415 | unsupported-media-type | Unsupported Media Type | リクエストのメディアタイプがサーバーでサポートされていないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.16 |
| 416 | range-not-satisfiable | Range Not Satisfiable | リクエストのRangeヘッダーで指定された範囲が満たせないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.17 |
| 417 | expectation-failed | Expectation Failed | サーバーがExpectヘッダーの要件を満たせないことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.18 |
| 418 | im-a-teapot | (Unused) | このステータスコードは現在使用されていません。 | 4xx クライアントエラー | RFC 9110, Section 15.5.19 |
| 421 | misdirected-request | Misdirected Request | リクエストが応答できないサーバーに送信されたことを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.20 |
| 422 | unprocessable-content | Unprocessable Content | リクエストは構文的に正しいが、意味的なエラーがあることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.21 |
| 423 | locked | Locked | リソースがロックされていてアクセスできないことを示します。 | 4xx クライアントエラー | RFC 4918 |
| 424 | failed-dependency | Failed Dependency | 依存するリクエストが失敗したためにリクエストが失敗したことを示します。 | 4xx クライアントエラー | RFC 4918 |
| 425 | too-early | Too Early | サーバーがリプレイ攻撃のリスクがあるリクエストの処理を拒否していることを示します。 | 4xx クライアントエラー | RFC 8470 |
| 426 | upgrade-required | Upgrade Required | クライアントが異なるプロトコルに切り替える必要があることを示します。 | 4xx クライアントエラー | RFC 9110, Section 15.5.22 |
| 428 | precondition-required | Precondition Required | サーバーがリクエストを条件付きにすることを要求していることを示します。 | 4xx クライアントエラー | RFC 6585 |
| 429 | too-many-requests | Too Many Requests | ユーザーが一定時間内に多すぎるリクエストを送信したことを示します。 | 4xx クライアントエラー | RFC 6585 |
| 431 | request-header-fields-too-large | Request Header Fields Too Large | リクエストヘッダーフィールドが大きすぎることを示します。 | 4xx クライアントエラー | RFC 6585 |
| 451 | unavailable-for-legal-reasons | Unavailable For Legal Reasons | 法的理由によりリソースにアクセスできないことを示します。 | 4xx クライアントエラー | RFC 7725 |
| 500 | internal-server-error | Internal Server Error | サーバーで予期しないエラーが発生したことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.1 |
| 501 | not-implemented | Not Implemented | サーバーがリクエストメソッドをサポートしていないことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.2 |
| 502 | bad-gateway | Bad Gateway | サーバーがゲートウェイとして動作中に無効なレスポンスを受信したことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.3 |
| 503 | service-unavailable | Service Unavailable | サーバーが一時的にリクエストを処理できないことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.4 |
| 504 | gateway-timeout | Gateway Timeout | ゲートウェイがアップストリームサーバーからの応答を時間内に受信できなかったことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.5 |
| 505 | http-version-not-supported | HTTP Version Not Supported | サーバーがリクエストで使用されたHTTPバージョンをサポートしていないことを示します。 | 5xx サーバーエラー | RFC 9110, Section 15.6.6 |
| 506 | variant-also-negotiates | Variant Also Negotiates | サーバーに内部構成エラーがあることを示します。 | 5xx サーバーエラー | RFC 2295 |
| 507 | insufficient-storage | Insufficient Storage | サーバーにリクエストを完了するための十分なストレージがないことを示します。 | 5xx サーバーエラー | RFC 4918 |
| 508 | loop-detected | Loop Detected | サーバーがリクエストの処理中に無限ループを検出したことを示します。 | 5xx サーバーエラー | RFC 5842 |
| 510 | not-extended | Not Extended (OBSOLETED) | リクエストを処理するために追加の拡張が必要であることを示します(廃止)。 | 5xx サーバーエラー | RFC 2774 |
| 511 | network-authentication-required | Network Authentication Required | クライアントがネットワークアクセスを得るために認証が必要であることを示します。 | 5xx サーバーエラー | RFC 6585 |