Коды состояния HTTP
Complete reference of HTTP response status codes with explanations and use cases.
HTTP Status Code Categories
- 1xx (Informational) · Request received, continuing process.
- 2xx (Success) · Request successfully received, understood, and accepted.
- 3xx (Redirection) · Further action needed to complete the request.
- 4xx (Client Error) · Request contains bad syntax or cannot be fulfilled.
- 5xx (Server Error) · Server failed to fulfill a valid request.
What's the difference between 301 and 302?
301 Moved Permanently tells clients the resource has permanently moved · search engines transfer ranking. 302 Found is a temporary redirect · the original URL keeps its ranking.
When should I use 401 vs 403?
401 Unauthorized means "not authenticated" · the client should provide credentials. 403 Forbidden means "authenticated but not allowed" · credentials won't help.
What does a 418 status code mean?
418 "I'm a teapot" is an April Fools' joke from RFC 2324 (Hyper Text Coffee Pot Control Protocol). It's not used in practice but is widely known in developer culture.