HTTPステータスコード検索

HTTPステータスコードの包括的なリファレンス。ステータスコードの意味を検索し、レスポンスコードを理解し、HTTPエラーコードについて学びます。

検索とフィルタ
100

Continue

情報 (1xx)

The server has received the request headers and the client should proceed to send the request body.

101

Switching Protocols

情報 (1xx)

The requester has asked the server to switch protocols and the server has agreed.

102

Processing

情報 (1xx)

A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.

103

Early Hints

情報 (1xx)

Used to return some response headers before final HTTP message.

200

OK

成功 (2xx)

The request is successful. The meaning of success depends on the HTTP method used.

201

Created

成功 (2xx)

The request has been fulfilled and a new resource has been created.

202

Accepted

成功 (2xx)

The request has been accepted for processing, but the processing has not been completed.

203

Non-Authoritative Information

成功 (2xx)

The request was successful but the information may have been modified by a transforming proxy.

204

No Content

成功 (2xx)

The server successfully processed the request but is not returning any content.

205

Reset Content

成功 (2xx)

The server successfully processed the request but is not returning any content and requires the requester to reset the document view.

206

Partial Content

成功 (2xx)

The server is delivering only part of the resource due to a range header sent by the client.

207

Multi-Status

成功 (2xx)

Provides status for multiple independent operations.

208

Already Reported

成功 (2xx)

The members of a DAV binding have already been enumerated in a preceding part of the multistatus response.

226

IM Used

成功 (2xx)

The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.

300

Multiple Choices

リダイレクト (3xx)

The request has more than one possible response. The user agent should choose one of them.

301

Moved Permanently

リダイレクト (3xx)

The URL of the requested resource has been changed permanently. The new URL is given in the response.

302

Found

リダイレクト (3xx)

The URL of the requested resource has been changed temporarily. Further changes in the URL might be made in the future.

303

See Other

リダイレクト (3xx)

The server sent this response to direct the client to get the requested resource at another URI with a GET request.

304

Not Modified

リダイレクト (3xx)

Used for caching purposes. The client can use cached version of the response.

305

Use Proxy

リダイレクト (3xx)

The requested resource is available only through a proxy.

306

Unused

リダイレクト (3xx)

This response code is no longer used and is reserved.

307

Temporary Redirect

リダイレクト (3xx)

The server sends this response to direct the client to get the requested resource at another URI with the same method.

308

Permanent Redirect

リダイレクト (3xx)

This means the resource is now permanently located at another URI.

400

Bad Request

httpStatusCodeLookup.categories.client-error

The server could not understand the request due to invalid syntax.

401

Unauthorized

httpStatusCodeLookup.categories.client-error

Authentication is required and has failed or has not yet been provided.

402

Payment Required

httpStatusCodeLookup.categories.client-error

This response code is reserved for future use and was originally created for digital payment systems.

403

Forbidden

httpStatusCodeLookup.categories.client-error

The client does not have access rights to the content; the server is refusing to give the requested resource.

404

Not Found

httpStatusCodeLookup.categories.client-error

The server can not find the requested resource. This is the most common error on the internet.

405

Method Not Allowed

httpStatusCodeLookup.categories.client-error

The request method is known by the server but is not supported by the target resource.

406

Not Acceptable

httpStatusCodeLookup.categories.client-error

The server cannot produce a response matching the list of acceptable values defined in the request's headers.

407

Proxy Authentication Required

httpStatusCodeLookup.categories.client-error

This is similar to 401 but authentication is required to be done by a proxy.

408

Request Timeout

httpStatusCodeLookup.categories.client-error

The server timed out waiting for the request. The client did not produce a request within the time the server was prepared to wait.

409

Conflict

httpStatusCodeLookup.categories.client-error

This response is sent when a request conflicts with the current state of the server.

410

Gone

httpStatusCodeLookup.categories.client-error

The requested content has been permanently deleted from the server with no forwarding address.

411

Length Required

httpStatusCodeLookup.categories.client-error

The server rejects the request because the Content-Length header field is not defined and the server requires it.

412

Precondition Failed

httpStatusCodeLookup.categories.client-error

The client has indicated preconditions in its headers which the server does not meet.

413

Payload Too Large

httpStatusCodeLookup.categories.client-error

The request entity is larger than limits defined by the server.

414

URI Too Long

httpStatusCodeLookup.categories.client-error

The URI requested by the client is longer than the server is willing to interpret.

415

Unsupported Media Type

httpStatusCodeLookup.categories.client-error

The media format of the requested data is not supported by the server.

416

Range Not Satisfiable

httpStatusCodeLookup.categories.client-error

The range specified by the Range header field in the request cannot be fulfilled.

417

Expectation Failed

httpStatusCodeLookup.categories.client-error

The expectation indicated by the Expect request header field cannot be met by the server.

418

I'm a teapot

httpStatusCodeLookup.categories.client-error

This code was defined in 1998 as one of the traditional IETF April Fools' jokes.

421

Misdirected Request

httpStatusCodeLookup.categories.client-error

The request was directed at a server that is not able to produce a response.

422

Unprocessable Entity

httpStatusCodeLookup.categories.client-error

The request was well-formed but was unable to be followed due to semantic errors.

423

Locked

httpStatusCodeLookup.categories.client-error

The resource that is being accessed is locked.

424

Failed Dependency

httpStatusCodeLookup.categories.client-error

The request failed because it depended on another request and that request failed.

425

Too Early

httpStatusCodeLookup.categories.client-error

Indicates that the server is unwilling to risk processing a request that might be replayed.

426

Upgrade Required

httpStatusCodeLookup.categories.client-error

The server refuses to perform the request using the current protocol.

428

Precondition Required

httpStatusCodeLookup.categories.client-error

The origin server requires the request to be conditional.

429

Too Many Requests

httpStatusCodeLookup.categories.client-error

The user has sent too many requests in a given amount of time.

431

Request Header Fields Too Large

httpStatusCodeLookup.categories.client-error

The server is unwilling to process the request because its header fields are too large.

451

Unavailable For Legal Reasons

httpStatusCodeLookup.categories.client-error

The server is denying access to the resource as a consequence of a legal demand.

500

Internal Server Error

httpStatusCodeLookup.categories.server-error

The server has encountered a situation it does not know how to handle.

501

Not Implemented

httpStatusCodeLookup.categories.server-error

The request method is not supported by the server and cannot be handled.

502

Bad Gateway

httpStatusCodeLookup.categories.server-error

The server, while acting as a gateway or proxy, received an invalid response from an upstream server.

503

Service Unavailable

httpStatusCodeLookup.categories.server-error

The server is not ready to handle the request. Common causes are a server that is down for maintenance or is overloaded.

504

Gateway Timeout

httpStatusCodeLookup.categories.server-error

The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.

505

HTTP Version Not Supported

httpStatusCodeLookup.categories.server-error

The HTTP version used in the request is not supported by the server.

506

Variant Also Negotiates

httpStatusCodeLookup.categories.server-error

The server has an internal configuration error.

507

Insufficient Storage

httpStatusCodeLookup.categories.server-error

The method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.

508

Loop Detected

httpStatusCodeLookup.categories.server-error

The server detected an infinite loop while processing the request.

510

Not Extended

httpStatusCodeLookup.categories.server-error

Further extensions to the request are required for the server to fulfill it.

511

Network Authentication Required

httpStatusCodeLookup.categories.server-error

The client needs to authenticate to gain network access.

HTTPステータスコード検索ツールの使い方

当サイトのHTTPステータスコード検索ツールは、すべてのHTTPステータスコードの包括的なリファレンスを提供します。これを使用して、任意のステータスコードに関する情報をすばやく見つけます:

  • コード番号(「404」など)、ステータス名(「not found」など)、または説明のキーワードを入力してステータスコードを検索します
  • カテゴリボタンを使用してカテゴリでフィルタし、情報、成功、リダイレクト、クライアントエラー、またはサーバーエラーコードのみを表示します
  • ステータスコードカードをクリックして展開し、説明、一般的な使用例、RFCリファレンスなどの詳細情報を表示します
  • コピーボタンを使用して、ドキュメント、コードコメント、またはAPI仕様で使用するためにステータスコードをコピーします

For more developer tools, check out our Toolbox homepage or explore related tools like our JSON Formatter and Hash Generator for API development workflows.

HTTPステータスコードとは?

HTTPステータスコード検索は、Web開発者、API設計者、およびWebテクノロジーを扱うすべての人にとって不可欠です。HTTPステータスコードは、WebサーバーがHTTPリクエストの結果を示すために返す3桁の数字です。これらのコードは、リクエストが成功したか、エラーが発生したか、または追加のアクションが必要かどうかに関する重要な情報を提供します。

WebサイトにアクセスしたりAPI呼び出しを行ったりすると、サーバーはリクエストされたリソースまたはエラーメッセージとともにHTTPステータスコードで応答します。ステータスコードは、最初の数字に基づいて5つの主要なカテゴリに分類されます:情報レスポンス(1xx)、成功レスポンス(2xx)、リダイレクト(3xx)、クライアントエラー(4xx)、およびサーバーエラー(5xx)。これらのコードを理解することは、開発者が問題をデバッグし、適切なエラー処理を実装し、より良いユーザーエクスペリエンスを作成するのに役立ちます。

HTTPステータスコードを知ることは、堅牢なWebアプリケーションとAPIを構築するために不可欠です。ステータスコードを適切に使用すると、エラー処理が改善され、デバッグが容易になり、APIドキュメントが向上し、エンドユーザーにとってより直感的なエラーメッセージを作成するのに役立ちます。当サイトのHTTPステータスコード検索ツールは、すべての標準および拡張ステータスコードの包括的なリファレンスを提供します。

The official HTTP status code specifications are defined in RFC 7231 and related RFC documents maintained by the Internet Engineering Task Force (IETF). For comprehensive documentation, refer to the MDN HTTP Status Codes reference.

HTTPステータスコードのカテゴリ

HTTPステータスコードは、5つの主要なカテゴリに分類されます。各カテゴリは、HTTP通信において特定の目的を果たします:

1xx Informational Responses

情報レスポンス(100-199)は、リクエストが受信され、プロセスが継続していることを示します。これらは、リクエスト処理フェーズで使用される暫定的なレスポンスです。例には、クライアントにリクエスト本文の送信を継続するように指示する100 Continueや、WebSocketなどの別のプロトコルにアップグレードするときに使用される101 Switching Protocolsがあります。

2xx Success Responses

成功レスポンス(200-299)は、リクエストが正常に受信され、理解され、受け入れられたことを示します。最も一般的な成功コードは200 OKで、リクエストが成功したことを意味します。その他の重要な成功コードには、201 Created(リソース作成用)、204 No Content(レスポンス本文なしの成功した操作用)、および206 Partial Content(ファイルダウンロードの範囲リクエスト用)があります。

3xx Redirection Responses

リダイレクトレスポンス(300-399)は、リクエストを完了するために追加のアクションを実行する必要があることを示します。これらのコードは、リソースが移動した場合や、別の場所を使用する必要がある場合に使用されます。一般的なリダイレクトコードには、301 Moved Permanently(永続的なURL変更とSEO用)、302 Found(一時的なリダイレクト)、および304 Not Modified(キャッシュ最適化用)があります。

4xx Client Error Responses

クライアントエラーレスポンス(400-499)は、リクエストにエラーがあったことを示します。これらのエラーはクライアントの責任であり、リクエストが不正、許可されていない、またはリクエストされたリソースが存在しないことを意味します。最も有名なクライアントエラーは404 Not Foundです。その他の重要なコードには、400 Bad Request(無効な構文)、401 Unauthorized(認証が必要)、403 Forbidden(許可が拒否されました)、および429 Too Many Requests(レート制限)があります。

5xx Server Error Responses

サーバーエラーレスポンス(500-599)は、サーバーが有効なリクエストを処理できなかったことを示します。これらのエラーはサーバーの責任であり、多くの場合、サーバー構成、データベース、またはアプリケーションロジックの問題を示しています。一般的なサーバーエラーには、500 Internal Server Error(一般的なサーバー障害)、502 Bad Gateway(アップストリームサーバーからの無効なレスポンス)、503 Service Unavailable(サーバーが一時的にダウン)、および504 Gateway Timeout(アップストリームサーバーのタイムアウト)があります。

最も一般的なHTTPステータスコードの説明

多数のHTTPステータスコードがありますが、Web開発では特定のコードがより頻繁に発生します。これらの一般的なコードを理解することは、効果的なデバッグとエラー処理に不可欠です:

200 OK

200 OKは、HTTPリクエストの標準的な成功レスポンスです。リクエストが成功し、レスポンスにリクエストされたリソースが含まれていることを示します。これは、成功したAPI呼び出しやWebページの読み込みで遭遇する最も一般的なステータスコードです。レスポンス本文には通常、リクエストされたデータ、HTML、JSON、またはその他のコンテンツタイプが含まれます。

201 Created

201 Createdは、リクエストの結果として新しいリソースが正常に作成されたことを示します。このコードは通常、新しいリソースを作成するPOSTリクエストへの応答として使用されます。レスポンスには通常、新しく作成されたリソースを指すLocationヘッダーが含まれます。これは、リソース作成エンドポイントのRESTful API設計における標準的な慣行です。

301 Moved Permanently

301 Moved Permanentlyは、リクエストされたリソースが新しいURLに永続的に移動したことを示します。これはSEOにとって重要であり、検索エンジンはインデックスを更新して新しい場所を指すようにします。301リダイレクトを実装する場合は、ブラウザと検索エンジンがこのリダイレクトを永続的にキャッシュするため、常に新しいURLが正しいことを確認してください。永続的なURLの変更、ドメインの移行、または重複コンテンツの統合にはこれを使用してください。

404 Not Found

404 Not Foundは、おそらく最も認識されているHTTPステータスコードです。サーバーがリクエストされたリソースを見つけられないことを示します。これは、リソースが永久になくなったこと(それは410 Goneになります)を意味するのではなく、指定された場所に存在しないことを意味します。一般的な原因には、リンク切れ、削除されたページ、正しくないURL、または欠落しているファイルがあります。エラーページを実装する場合は、ユーザーが探しているものを見つけるのに役立つ有益なナビゲーションオプションと検索機能を提供してください。

500 Internal Server Error

500 Internal Server Errorは、サーバー側で何か問題が発生したことを示す一般的なサーバーエラーですが、サーバーは問題の内容をより具体的に説明できませんでした。このコードは、予期しない条件が発生してサーバーがリクエストを処理できなかった場合に使用する必要があります。アプリケーションコードやサーバー構成に対処する必要がある問題を示しているため、デバッグの目的でこれらのエラーをサーバーに記録することが重要です。

API開発におけるHTTPステータスコード

RESTful APIを構築する際、正しいステータスコードの使用は基本的です。ステータスコードはAPI操作の結果を明確かつ一貫して伝えるため、APIの理解と統合が容易になります:

  • 一貫性:API全体で適切なステータスコードを一貫して使用することで、開発者はAPIをより簡単に理解し統合できます。RESTの慣習とHTTP標準に従って、予測可能な動作を保証します。
  • エラー処理:異なるステータスコードは、クライアントアプリケーションがエラーを適切に処理するのに役立ちます。4xxエラーはクライアント側で修正可能な問題(無効な入力など)を示し、5xxエラーはサーバーの介入が必要なサーバー側の問題を示します。
  • ドキュメンテーション:APIエンドポイントが返す可能性のあるステータスコードを文書化することで、開発者は適切なエラー処理を実装できます。APIドキュメント、OpenAPI仕様、およびコード例にステータスコードを含めます。
  • クライアント体験:適切に選ばれたステータスコードは、明確で実用的な情報を提供することでクライアント体験を向上させます。例えば、429 Too Many Requestsの応答にRetry-Afterヘッダーを含めることで、クライアントにリクエストを再試行するタイミングを具体的に示せます。

HTTPステータスコードのベストプラクティス

HTTPステータスコードのベストプラクティスに従うことで、WebアプリケーションとAPIの信頼性、保守性、ユーザビリティが向上します:

  • 適切なコードを選択する:リクエストの結果を正確に反映するステータスコードを選択してください。エラー条件に200 OKを使用したり、クライアントエラーに500を使用したりしないでください。状況を正確に記述する最も具体的なコードを使用します。
  • 詳細を提供する:エラーステータスコード(4xx、5xx)を返す際は、レスポンス本文に詳細なエラーメッセージを含めます。これにより、開発者は問題をデバッグし、より良いエラー処理機能を提供できます。エラーコード、説明、および可能な解決策を含めます。
  • ログ記録と監視:監視とデバッグの目的で、すべての非2xxステータスコードをログに記録します。エラー率を追跡し、パターンを特定し、異常なエラースパイクに対するアラートを設定します。これにより、ユーザーに重大な影響を与える前に問題を特定できます。
  • モニタリング:ステータスコードの監視を使用してアプリケーションの健全性を追跡します。5xxエラーの高い割合はサーバーの問題を示し、4xxエラーの高い割合はクライアント側の問題、APIの誤用、または注意が必要なドキュメントの問題を示す可能性があります。

一般的なステータスコードの問題のトラブルシューティング

HTTPステータスコードに基づいた問題のトラブルシューティング方法を理解することは、Web開発者とシステム管理者にとって不可欠なスキルです:

クライアントエラー(4xx):4xxエラーが発生した場合、リクエストの形式、認証情報、認可権限、およびリクエストされたリソースが存在するかを確認してください。リクエストヘッダー、クエリパラメータ、およびリクエスト本文の形式を確認します。一般的な修正には、URLの修正、適切な認証の提供、リクエスト構文の修正、リソースの存在確認が含まれます。

400 Bad Requestの場合、入力データを検証しリクエスト形式を確認します。401 Unauthorizedの場合、認証トークンまたは資格情報を確認します。403 Forbiddenの場合、ユーザー権限と認可ルールを確認します。404 Not Foundの場合、リソースURLと存在を確認します。429 Too Many Requestsの場合、レート制限を実装するか、再試行する前に待機します。

サーバーエラー(5xx):5xxエラーは調査が必要なサーバー側の問題を示します。サーバーログ、データベース接続、アプリケーションコード、サーバー構成、およびシステムリソースを確認してください。これらのエラーは通常、解決するために開発者またはシステム管理者の介入が必要です。

500 Internal Server Errorの場合、アプリケーションログで例外を確認し、データベース接続を検証し、最近のコード変更を確認します。502 Bad Gatewayの場合、アップストリームサーバーの健全性とプロキシ構成を確認します。503 Service Unavailableの場合、サーバーの容量を確認し、メンテナンス操作を確認し、リソースの制約を確認します。504 Gateway Timeoutの場合、アップストリームサーバーの応答時間とタイムアウト設定を確認します。