HTTP Status Codes
HTTP Status Codes
Complete reference of HTTP status codes with descriptions and usage guidance.
1xx Informational
2xx Success
3xx Redirection
4xx Client Error
5xx Server Error
Tentang HTTP Status Codes ReferenceAbout HTTP Status Codes Reference
What Are HTTP Status Codes and Why Every Developer Must Know Them
HTTP status codes are three-digit numbers that a web server returns in response to every HTTP request. They are the primary communication mechanism between servers and clients (browsers, API consumers, search engine crawlers) about whether a request succeeded, failed, or requires additional action. Every web developer, API designer, and SEO professional needs to understand these codes because they directly impact user experience, search engine indexing, API reliability, and troubleshooting efficiency. When something goes wrong on the web, the HTTP status code is your first clue to diagnosing the problem.
Our HTTP status codes reference at Jayax.dev provides a complete, searchable guide to all standard HTTP status codes with clear explanations, common use cases, and troubleshooting tips. Whether you are debugging a broken API, fixing SEO crawl errors, or configuring server redirects, this reference gives you the information you need.
HTTP Status Code Categories
HTTP status codes are organized into five categories based on the first digit. Understanding these categories helps you quickly identify the general nature of any response.
2xx — Success
The 2xx category indicates that the request was successfully received, understood, and accepted. The most common is 200 OK, which means the request succeeded and the response body contains the requested data. Other important codes include 201 Created (a new resource was successfully created, common in POST requests), 204 No Content (the request succeeded but there is no response body), and 206 Partial Content (the server is delivering only part of the resource, used for range requests and video streaming).
3xx — Redirection
The 3xx category indicates that the client must take additional action to complete the request, typically following a redirect. 301 Moved Permanently is the most important for SEO — it permanently redirects to a new URL and transfers link equity. 302 Found is a temporary redirect. 304 Not Modified indicates the cached version is still valid, saving bandwidth. Understanding the difference between 301 and 302 is critical for maintaining SEO value during site migrations and URL changes.
4xx — Client Errors
The 4xx category indicates that the client made a bad request. 400 Bad Request means the request syntax is malformed. 401 Unauthorized requires authentication. 403 Forbidden means access is denied even with authentication. 404 Not Found means the requested resource does not exist. 429 Too Many Requests indicates rate limiting. These errors are caused by the client and must be fixed on the client side.
5xx — Server Errors
The 5xx category indicates that the server failed to fulfill a valid request. 500 Internal Server Error is a generic server failure. 502 Bad Gateway means a proxy or gateway received an invalid response from the upstream server. 503 Service Unavailable means the server is temporarily unable to handle the request (overloaded or in maintenance). 504 Gateway Timeout means the upstream server did not respond in time. These errors must be fixed on the server side.
Most Important HTTP Status Codes for Web Development
While there are many status codes, a handful appear in everyday development. Here are the ones you will encounter most frequently and what to do about them.
- 200 OK — Everything is working correctly. The standard success response.
- 301 Moved Permanently — Use for permanent URL changes. Transfers SEO value to the new URL.
- 304 Not Modified — The cached version is still fresh. Saves bandwidth and load time.
- 400 Bad Request — The request is malformed. Check your request body, headers, and parameters.
- 401 Unauthorized — Authentication is required. Check your API keys or login credentials.
- 403 Forbidden — You are authenticated but not authorized. Check permissions.
- 404 Not Found — The resource does not exist. Check the URL and implement redirects for moved content.
- 500 Internal Server Error — Server-side failure. Check server logs for the specific error.
- 502/503/504 — Infrastructure issues. Check server health, upstream services, and load balancer configuration.
Troubleshooting HTTP Errors
When you encounter an HTTP error, start by identifying the status code category. 4xx errors are client-side problems — check your URL, request parameters, authentication, and permissions. 5xx errors are server-side problems — check server logs, database connections, application code, and infrastructure health. For SEO purposes, monitor Google Search Console for crawl errors and fix 404s with 301 redirects, resolve 5xx errors promptly, and ensure your server returns proper status codes for all pages.
Pertanyaan yang Sering DiajukanFrequently Asked Questions
HTTP status codes are three-digit numbers returned by a server in response to a client request. They indicate whether the request was successful, redirected, resulted in a client error, or caused a server error. Understanding these codes is essential for web development, API debugging, and server administration.
HTTP status codes are organized into five categories: 1xx (Informational), 2xx (Success), 3xx (Redirection), 4xx (Client Error), and 5xx (Server Error). The first digit of the code indicates the category, making it easy to identify the general type of response at a glance.
A 404 Not Found error means the server could not find the requested resource. This usually happens when a URL is incorrect, a page has been deleted without a redirect, or the user typed the wrong address. To fix 404 errors, implement proper 301 redirects for moved pages and create a custom 404 page to help users find what they need.
A 301 redirect is permanent — it tells search engines and browsers that the page has permanently moved to a new URL, transferring SEO value to the new location. A 302 redirect is temporary — it indicates the page is temporarily at a different URL but will return. Use 301 for permanent moves and 302 for temporary situations like maintenance or A/B testing.
A 500 Internal Server Error is a generic server-side error indicating that something went wrong on the server while processing the request. Common causes include application code errors, database connection failures, misconfigured server settings, and resource exhaustion. Check server error logs for the specific cause.
A 401 Unauthorized error means the request requires authentication but none was provided or the provided credentials are invalid. A 403 Forbidden error means the server understood the request but refuses to authorize it, even with valid credentials — the user does not have permission to access the resource.
A 429 Too Many Requests error means the client has sent too many requests in a given timeframe and is being rate-limited. This is common with APIs that enforce rate limits. The response usually includes a Retry-After header indicating how long to wait before making another request.
A 204 No Content status means the server successfully processed the request but is not returning any content. This is commonly used for successful DELETE requests, PUT requests that update a resource without returning data, and AJAX operations where no response body is needed.
You can check HTTP status codes using browser developer tools (Network tab), command-line tools like curl with the -I flag for headers, online HTTP header checkers, or server monitoring tools. Our reference guide helps you understand what each code means once you identify it.
The most important status codes for SEO are: 200 (OK — page loads correctly), 301 (permanent redirect — transfers SEO value), 302 (temporary redirect — use sparingly), 404 (not found — fix with redirects), 410 (gone — tells search engines the page was intentionally removed), and 500 (server error — fix immediately as it prevents indexing).