Back to Tools

Mã Trạng Thái HTTP

Hướng dẫn tham khảo đầy đủ ý nghĩa của các mã trạng thái HTTP và lỗi kết nối. Tài liệu thiết yếu cho lập trình viên web và gỡ lỗi API.

100
1XXContinue

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

101
1XXSwitching Protocols

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

200
2XXOK

Standard response for successful HTTP requests.

201
2XXCreated

The request has been fulfilled, resulting in the creation of a new resource.

202
2XXAccepted

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

204
2XXNo Content

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

301
3XXMoved Permanently

This and all future requests should be directed to the given URI.

302
3XXFound

Tells the client to look at (browse to) another URL.

304
3XXNot Modified

Indicates that the resource has not been modified since the version specified by the request headers.

307
3XXTemporary Redirect

The request should be repeated with another URI; however, future requests should still use the original URI.

308
3XXPermanent Redirect

The request and all future requests should be repeated using another URI.

400
4XXBad Request

The server cannot or will not process the request due to an apparent client error.

401
4XXUnauthorized

Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.

403
4XXForbidden

The request contained valid data and was understood by the server, but the server is refusing action.

404
4XXNot Found

The requested resource could not be found but may be available in the future.

405
4XXMethod Not Allowed

A request method is not supported for the requested resource.

409
4XXConflict

Indicates that the request could not be processed because of conflict in the current state of the resource.

422
4XXUnprocessable Entity

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

429
4XXToo Many Requests

The user has sent too many requests in a given amount of time (rate limiting).

500
5XXInternal Server Error

A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.

502
5XXBad Gateway

The server was acting as a gateway or proxy and received an invalid response from the upstream server.

503
5XXService Unavailable

The server cannot handle the request (because it is overloaded or down for maintenance).

504
5XXGateway Timeout

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

Câu Hỏi Thường Gặp (FAQ)

Mã HTTP Status Code là gì?
HTTP Status Code là những mã phản hồi gồm 3 chữ số từ máy chủ (server) báo lại cho trình duyệt (client) biết tình trạng của yêu cầu mà bạn vừa gửi. Ví dụ: thành công, lỗi máy khách, hay lỗi máy chủ.
Lỗi 404 Not Found có nghĩa là gì?
Mã lỗi 404 cho biết máy chủ không thể tìm thấy trang web hoặc tài nguyên mà bạn đang yêu cầu. Điều này thường do sai đường dẫn (URL) hoặc trang đã bị xóa.
Lỗi 5xx khác với lỗi 4xx như thế nào?
Lỗi 4xx (ví dụ 400, 404) là lỗi do người dùng (client) như nhập sai thông tin, sai URL, hoặc không có quyền truy cập. Trong khi đó, lỗi 5xx (ví dụ 500, 502) là lỗi xuất phát từ hệ thống máy chủ không thể xử lý yêu cầu.
Có bao nhiêu nhóm mã trạng thái HTTP?
Có 5 nhóm chính: 1xx (Thông tin), 2xx (Thành công), 3xx (Chuyển hướng), 4xx (Lỗi máy khách), và 5xx (Lỗi máy chủ).