HTTP ステータスコード
カテゴリ別にステータスコードを閲覧できます。各行を展開すると、そのコードの実際の HTTP メッセージ例が表示されます。
1xx情報レスポンス(Informational)
100Continueクライアントはリクエストボディの送信を続けてよい。例を見る
→ REQUEST
POST /uploads HTTP/1.1 Host: example.com Content-Length: 5242880 Expect: 100-continue
← RESPONSE
HTTP/1.1 100 Continue (client now streams the 5 MB body) HTTP/1.1 201 Created Location: /uploads/8f2c
101Switching Protocolsサーバーがプロトコルの切り替えに同意した(WebSocket へのアップグレードなど)。例を見る
→ REQUEST
GET /chat HTTP/1.1 Host: example.com Upgrade: websocket Connection: Upgrade Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== Sec-WebSocket-Version: 13
← RESPONSE
HTTP/1.1 101 Switching Protocols Upgrade: websocket Connection: Upgrade Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
102Processing102 Processing ステータスコードの意味、長時間のリクエスト中にクライアントのタイムアウトを防ぐ仕組み、そして WebDAV に由来する背景を理解します。例を見る
→ REQUEST
GET /sample.pdf HTTP/1.1 Host: example.com
103Early Hints103 Early Hints の仕組みと、最終レスポンスが届く前にリソースを先読みしてページ読み込みを速める方法を理解します。例を見る
→ REQUEST
GET /index.html HTTP/1.1 Host: example.com
2xx成功(Success)
200OKリクエストは成功し、レスポンスに要求されたリソースが含まれる。例を見る
→ REQUEST
GET /products/42 HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 200 OK Content-Type: application/json Content-Length: 51 { "id": 42, "name": "Trailhead Boot", "price": 189 }
201Createdリクエストは成功し、新しいリソースが作成された。例を見る
→ REQUEST
POST /products HTTP/1.1 Host: example.com Content-Type: application/json { "name": "Ridge Boot", "price": 210 }
← RESPONSE
HTTP/1.1 201 Created Location: /products/43 Content-Type: application/json { "id": 43, "name": "Ridge Boot", "price": 210 }
202Accepted202 Accepted レスポンスの意味、非同期処理を示す仕組み、そして最終結果をポーリングで取得する方法を学びます。例を見る
→ REQUEST
POST /job HTTP/1.1 Host: example.com Content-Type: application/xml Content-Length: 68 <?xml version="1.0"?> <job> <id>125</id> <task>G01</task> </job>
203Non-Authoritative Information203 Non-Authoritative Information レスポンスの意味、プロキシが 203 を返す場面、そして 200 OK との違いを学びます。例を見る
→ REQUEST
GET /instructions HTTP/1.1 Host: example.com
204No Content成功したが、レスポンスボディはない。例を見る
→ REQUEST
DELETE /products/43 HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 204 No Content (no body)
205Reset Content205 Reset Content レスポンスの意味、クライアントにフォーム内容の消去を指示する仕組み、そして 204 との違いを学びます。例を見る
→ REQUEST
POST /signup HTTP/1.1 Host: example.com Content-Type: application/xml Content-Length: 92 <?xml version="1.0"?> <person> <name>David Smith</name> <country>USA</country> </person>
206Partial Content206 Partial Content レスポンスの仕組み、レジューム可能なダウンロードを支える Range リクエスト、そしてマルチパート範囲レスポンスを理解します。例を見る
→ REQUEST
GET /videos/sample.mp4 HTTP/1.1 Host: example.com Range: bytes=25000-75000
207Multi-Status207 Multi-Status レスポンスの意味、WebDAV がリソースごとの結果を 207 で返す仕組み、そして XML ボディの解析方法を学びます。例を見る
<d:response> <d:href>http://example.re/tasks</d:href> <d:status>HTTP/1.1 200 OK</d:status> </d:response>
208Already Reported208 Already Reported ステータスコードの意味と、WebDAV が 207 レスポンスの中で 208 を使ってリソースの重複列挙を避ける仕組みを理解します。例を見る
→ REQUEST
PROPFIND /main/ HTTP/1.1 Host: example.com Depth: infinity DAV: bind Content-Type: application/xml; charset="utf-8" Content-Length: 139 <?xml version="1.0" encoding="utf-8" ?> <d:propfind xmlns:d="DAV:"> <d:prop> <d:name/> <d:link/> </d:prop> </d:propfind>
226IM Used226 IM Used レスポンスの意味と、差分エンコーディングやインスタンス操作が HTTP レスポンスの帯域を節約する仕組みを学びます。例を見る
→ REQUEST
GET /livingdocs/current_specs.pdf HTTP/1.1 Host: example.com Accept-Encoding: gzip
3xxリダイレクト(Redirection)
300Multiple Choices300 Multiple Choices レスポンスの意味、サーバーが 300 を返す場面、そしてクライアントが複数の表現から選ぶ方法を理解します。例を見る
→ REQUEST
GET /tech-news HTTP/1.1 Host: example.com
301Moved Permanentlyリソースは Location の示すアドレスへ恒久的に移動した。例を見る
→ REQUEST
GET /old-path HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 301 Moved Permanently Location: https://example.com/new-path
302Foundリソースは一時的に Location の場所にある。例を見る
→ REQUEST
GET /account HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 302 Found Location: /login
303See Other303 See Other リダイレクトの仕組み、常に GET へ切り替わる理由、そして POST・PUT・DELETE の後に 303 を使う場面を学びます。例を見る
→ REQUEST
DELETE /tasks/314 HTTP/1.1 Host: example.com
304Not Modifiedキャッシュは有効で、ローカルの複製をそのまま使える。例を見る
→ REQUEST
GET /logo.png HTTP/1.1 Host: example.com If-None-Match: "9c2e-abc123"
← RESPONSE
HTTP/1.1 304 Not Modified ETag: "9c2e-abc123" (no body — reuse the cached copy)
305Use Proxy非推奨となった 305 Use Proxy ステータスコードについて、セキュリティ上の懸念から廃止された経緯と、その代替を学びます。例を見る
→ REQUEST
GET /document.pdf HTTP/1.1 Host: example.com
307Temporary Redirect307 Temporary Redirect の仕組み、302 と違ってリクエストメソッドを保つ理由、そして 302 や 303 より 307 を選ぶ場面を理解します。例を見る
→ REQUEST
GET /news.html HTTP/1.1 Host: example.com
308Permanent Redirect308 Permanent Redirect の仕組み、301 と違ってリクエストメソッドを保つ点、そして検索エンジンがリンク評価を引き継ぐ仕組みを理解します。例を見る
→ REQUEST
POST /api/v1/orders HTTP/1.1 Host: example.com Content-Type: application/json Content-Length: 35 {"item": "widget", "quantity": 10}
4xxクライアントエラー(Client Error)
400Bad Requestリクエストの構文またはパラメーターが不正。例を見る
→ REQUEST
POST /products HTTP/1.1 Host: example.com Content-Type: application/json { "price": "not-a-number" }
← RESPONSE
HTTP/1.1 400 Bad Request Content-Type: application/json { "error": "price must be a number" }
401Unauthorized認証が必要。例を見る
→ REQUEST
GET /account HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 401 Unauthorized WWW-Authenticate: Bearer realm="api"
402Payment Required402 Payment Required を理解します。予約済みのステータスコードであること、Shopify や Stripe による非標準な使われ方、そして SEO への影響を扱います。例を見る
→ REQUEST
GET /tech-news HTTP/1.1 Host: example.com
403Forbidden認証は通ったが、権限がない。例を見る
→ REQUEST
DELETE /users/1 HTTP/1.1 Host: example.com Authorization: Bearer <valid-token>
← RESPONSE
HTTP/1.1 403 Forbidden Content-Type: application/json { "error": "admin role required" }
404Not Found対象のリソースが見つからない。例を見る
→ REQUEST
GET /products/9999 HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 404 Not Found Content-Type: application/json { "error": "product 9999 not found" }
405Method Not Allowedこのリソースではそのメソッドは許可されていない。例を見る
→ REQUEST
DELETE /products HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 405 Method Not Allowed Allow: GET, POST, QUERY
406Not Acceptable406 Not Acceptable エラーの解決法。コンテントネゴシエーション、Accept ヘッダー、そして満たせないリクエストをサーバーがどう扱うかを理解します。例を見る
Accept: text/html, text/plain
407Proxy Authentication Required407 Proxy Authentication Required エラーの解決法。プロキシ認証の方式と Proxy-Authenticate ヘッダーを学びます。例を見る
→ REQUEST
GET /documents/tech-news HTTP/1.1 Host: example.com
408Request Timeout408 Request Timeout エラーの解決法。サーバーが遅い接続を閉じる理由と、伝送の問題をどう解決するかを理解します。例を見る
→ REQUEST
PUT /docs HTTP/1.1 Host: example.com Content-Type: application/pdf Content-Length: 10000
409Conflict409 Conflict エラーの解決法。リソース状態の競合、解決の方針、そして API でよくある利用場面を理解します。例を見る
→ REQUEST
POST /blog/update?postid=111&flag=like HTTP/1.1 Host: example.com
410Gone410 Gone を理解します。リソースの恒久的な削除、404 との違い、キャッシュの挙動、そして SEO のインデックスへの影響を扱います。例を見る
→ REQUEST
GET /holiday-promotion-Jan-2021.pdf HTTP/1.1 Host: example.com
411Length Required411 Length Required エラーの解決法。Content-Length ヘッダーが必要になる場面と、このクライアントエラーの直し方を学びます。例を見る
→ REQUEST
PUT /docs HTTP/1.1 Host: example.com Content-Type: application/pdf <PDF file included as message body>
412Precondition Failed412 Precondition Failed エラーの解決法。条件付きリクエストのヘッダー、If-Match の失敗、そして更新の取りこぼしを防ぐ方法を学びます。例を見る
→ REQUEST
POST /blog/update?postid=111&task=reply HTTP/1.1 Host: example.com If-Unmodified-Since: Fri, 1 Jan 2021 00:00:00 GMT Content-Type: text/plain Content-Length: 45 <Message body contains reply-text from the client>
413Content Too Large413 Content Too Large エラーの解決法。サーバー側のサイズ上限、Expect ヘッダーの使い方、そして大きすぎるアップロードへの対処を学びます。例を見る
→ REQUEST
PUT /docs HTTP/1.1 Host: example.com Content-Type: application/pdf Content-Length: 10000
414URI Too Long414 URI Too Long エラーの解決法。URL 長の上限、ブラウザーの制約、そしてリクエスト URI を短くする方法を理解します。例を見る
→ REQUEST
GET /<...a_long_URI...> HTTP/1.1 Host: example.com
415Unsupported Media Type415 Unsupported Media Type エラーの解決法。Content-Type と Content-Encoding の検証、そして切り分けの手順を学びます。例を見る
→ REQUEST
POST /blog/newmessage HTTP/1.1 Host: example.com Content-Type: text/plain Content-Length: 24 Good morning, Everybody!
416Range Not Satisfiable416 Range Not Satisfiable エラーの解決法。バイト範囲リクエスト、Content-Range ヘッダー、そして解決方法を理解します。例を見る
Content-Range: bytes */512
417Expectation Failed417 Expectation Failed エラーの解決法。Expect ヘッダーと 100-continue の仕組み、そして 417 が返る条件を学びます。例を見る
→ REQUEST
PUT /docs HTTP/1.1 Host: example.com Content-Type: application/pdf Content-Length: 10000 Expect: 100-continue
418I'm a teapot私はティーポット——RFC 2324 のイースターエッグ的ステータスコード。例を見る
→ REQUEST
BREW /coffee HTTP/1.1 Host: teapot.example
← RESPONSE
HTTP/1.1 418 I'm a teapot Content-Type: text/plain I refuse to brew coffee — I am a teapot.
421Misdirected Request421 Misdirected Request エラーの解決法。コネクションの再利用、HTTP/2 のルーティング、そして Alt-Svc まわりの切り分けを理解します。例を見る
→ REQUEST
GET /tech-news HTTP/2 Host: example.com
422Unprocessable Content422 Unprocessable Content エラーの解決法。400 や 415 との違い、そして意味的な検証エラーの直し方を学びます。例を見る
→ REQUEST
POST /requests HTTP/1.1 Host: example.com Content-Type: application/xml Content-Length: 101 <?xml version="1.0" encoding="utf-8"?> <request> <id>100</id> <action>start</action> </request>
423Locked423 Locked エラーの解決法。WebDAV のファイルロック機構、Lock-Token ヘッダー、前提条件コード、そしてリソースのロック解除を学びます。例を見る
→ REQUEST
PUT /documents/ HTTP/1.1 Host: example.com Content-Type: application/pdf Content-Length: 10000 <PDF file transferred>
424Failed Dependency424 Failed Dependency エラーの解決法。WebDAV のマルチステータスレスポンス、PROPPATCH 操作、そして依存関係の解決を学びます。例を見る
→ REQUEST
PROPPATCH /update.html HTTP/1.1 Host: example.com Content-Type: application/xml; charset="utf-8" Content-Length: 305 <?xml version="1.0" encoding="utf-8" ?> <d:propertyupdate xmlns:d="DAV:" xmlns:z="urn:example"> <d:set> <d:prop> <z:seats> <z:seatnumber>100</z:seatnumber> <z:seatnumber>101</z:seatnumber> </z:seats> </d:prop> <d:prop> <d:name>Smith</d:name> </d:prop> </d:set> </d:propertyupdate>
425Too Early425 Too Early を理解します。TLS の early data に伴うリプレイのリスク、Early-Data ヘッダー、そしてサーバー側の保護策を扱います。例を見る
→ REQUEST
GET /tech-news HTTP/1.1 Host: example.com Early-Data: 1
426Upgrade Required426 Upgrade Required エラーの解決法。プロトコルのアップグレード要件、Upgrade ヘッダー、そして対処手順を学びます。例を見る
→ REQUEST
GET /tech-news HTTP/1.1 Host: example.com
428Precondition Required428 Precondition Required エラーの解決法。If-Match などの条件付きヘッダーと、更新の取りこぼしを防ぐ方法を学びます。例を見る
→ REQUEST
PUT /reservations.txt HTTP/1.1 Host: example.com
429Too Many Requestsリクエストが多すぎる。レート制限中。例を見る
→ REQUEST
GET /api/search HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 429 Too Many Requests Retry-After: 30 Content-Type: application/json { "error": "rate limit exceeded" }
431Request Header Fields Too Large431 Request Header Fields Too Large エラーの解決法。ヘッダーサイズの上限、Cookie の削減、そして切り分けの手順を学びます。例を見る
→ REQUEST
GET /tech-news HTTP/1.1 Host: example.com Cookie: first_cookie=<very_long>; second_cookie=<long_again>
451Unavailable For Legal Reasons451 Unavailable For Legal Reasons を理解します。検閲に伴うレスポンス、法的要求、そして Exchange ActiveSync での使われ方を扱います。例を見る
→ REQUEST
GET /tech-trial-updates HTTP/1.1 Host: example.com
5xxサーバーエラー(Server Error)
500Internal Server Errorサーバー内部でエラーが発生した。例を見る
→ REQUEST
GET /report HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 500 Internal Server Error Content-Type: application/json { "error": "unexpected server error" }
501Not Implemented501 Not Implemented エラーの解決法。未対応の HTTP メソッド、405 との違い、そしてサーバー設定を理解します。例を見る
→ REQUEST
POST /requests?id=111&flag=start HTTP/1.1 Host: example.com
502Bad Gatewayゲートウェイが上流から不正なレスポンスを受け取った。例を見る
→ REQUEST
GET /api/users HTTP/1.1 Host: gateway.example.com
← RESPONSE
HTTP/1.1 502 Bad Gateway Content-Type: text/plain upstream sent an invalid response
503Service Unavailableサービスは一時的に利用できない(過負荷またはメンテナンス中)。例を見る
→ REQUEST
GET / HTTP/1.1 Host: example.com
← RESPONSE
HTTP/1.1 503 Service Unavailable Retry-After: 120 Content-Type: text/plain under maintenance — try again shortly
504Gateway Timeout504 Gateway Timeout エラーの解決法。上流のタイムアウト要因、プロキシ設定、そして切り分け方法を学びます。例を見る
→ REQUEST
GET /news HTTP/1.1 Host: example.com
505HTTP Version Not Supported505 HTTP Version Not Supported エラーの解決法。プロトコルバージョンの不一致とサーバーの互換性を学びます。例を見る
→ REQUEST
GET / HTTP/2 Host: example.com
506Variant Also Negotiates506 Variant Also Negotiates を理解します。透過的コンテントネゴシエーションにおける循環参照と、サーバー設定の誤りを扱います。例を見る
→ REQUEST
GET /docs HTTP/1.1 Host: example.com Accept: text/html, application/xhtml+xml
507Insufficient Storage507 Insufficient Storage エラーの解決法。WebDAV のストレージ上限、413 との違い、そして解決方法を理解します。例を見る
→ REQUEST
PUT /docs HTTP/1.1 Host: example.com Content-Type: application/pdf Content-Length: 10000 <PDF file included in message body>
508Loop Detected508 Loop Detected エラーの解決法。WebDAV の無限ループと、cPanel のリソース上限まわりの切り分けを理解します。例を見る
→ REQUEST
PROPFIND /shared/ HTTP/1.1 Host: example.com Depth: infinity Content-Type: application/xml
510Not Extended510 Not Extended を理解します。廃止された HTTP Extension Framework、その歴史的な位置づけ、そして使われ方を扱います。例を見る
→ REQUEST
GET /resource HTTP/1.1 Host: example.com
511Network Authentication Required511 Network Authentication Required エラーの解決法。キャプティブポータル、Wi-Fi のログインページ、そしてクライアント側の扱いを理解します。例を見る
→ REQUEST
GET / HTTP/1.1 Host: example.com