The Complete Guide to HTTP Status Codes (For Absolute Beginners)

Complete Guide to HTTP Status Codes

When you browse the internet, you’re constantly talking to servers — silently, in the background.

Each time you visit a website, your browser sends a request to the website’s server, and the server responds.

That response includes something called an HTTP status code — a simple 3-digit number that tells your browser whether things went smoothly or if something went wrong.

Let’s break down what these codes mean, category by category, with examples you can relate to.

What is an HTTP Status Code?

An HTTP status code is a three-digit numerical code that a website’s server sends to your web browser (or any client, like an API client) in response to an HTTP request.

Essentially, it’s a message from the server indicating the outcome of the request, telling the client whether the request was successful, redirected, or if an error occurred.

These codes are embedded in the HTTP header of a page and are crucial for communication between the client and server.

While you don’t always see them (e.g., if a page loads successfully, you typically don’t see the “200 OK” status), they are always sent.

When something goes wrong, a status code often becomes visible to the user (like the common “404 Not Found” error).

They’re grouped into five main categories based on the first digit of the code:

  • 1xx — Informational: “Hang tight, we’re working on it.”
  • 2xx — Success: “Everything went great!”
  • 3xx — Redirection: “Go this way instead.”
  • 4xx — Client Errors: “You made a mistake.”
  • 5xx — Server Errors: “Oops! Something’s wrong on our end.”

Let’s explore each group in more detail.


1xx – Informational Codes

These codes mean the request was received and understood. But the process isn’t finished yet.

  • 100 Continue: The server got your first part of the request. Keep going.
  • 101 Switching Protocols: The server is switching to a different protocol as requested.
  • 102 Processing: A WebDAV server is processing your request, but it’s taking time.
  • 103 Early Hints: The server is sending headers before the final response, often used to speed up loading.

2xx – Success Codes

These are the best ones! They mean everything worked as expected.

  • 200 OK: Everything’s perfect. The request went through, and here’s your content.
  • 201 Created: Something was successfully created, like a new account.
  • 202 Accepted: Your request was received but hasn’t been processed yet.
  • 203 Non-Authoritative Information: Data is okay, but it’s from a third-party source.
  • 204 No Content: The request was successful, but there’s nothing to show.
  • 205 Reset Content: Same as 204, but tells the user to reset the form or view.
  • 206 Partial Content: Only part of the requested data is being sent (like when streaming a video).
  • 207 Multi-Status (WebDAV): Provides info about multiple operations.
  • 208 Already Reported (WebDAV): This has already been reported in a previous response.
  • 226 IM Used: The server has completed a GET request using instance-manipulation.

3xx – Redirection Codes

These tell your browser: “What you’re looking for isn’t here—try over there.”

  • 300 Multiple Choices: There are several options to choose from (rarely used).
  • 301 Moved Permanently: The page has a new home. Update your bookmarks!
  • 302 Found (Previously “Moved Temporarily”): Temporarily moved, but come back later.
  • 303 See Other: Use a different URL to access the resource.
  • 304 Not Modified: The content hasn’t changed since your last visit. Use your cached version.
  • 305 Use Proxy (Deprecated): Go through a proxy to access this.
  • 306 Switch Proxy: Reserved for future use (not currently used).
  • 307 Temporary Redirect: Use this new URL, but keep using the original request method.
  • 308 Permanent Redirect: Like 301, but tells your browser to always use this new path with the same request method.

4xx – Client Error Codes

These mean something went wrong on your end — maybe a bad link, a typo, or a missing file.

  • 400 Bad Request: The server couldn’t understand the request. Usually a syntax error.
  • 401 Unauthorized: You need to log in to access this.
  • 402 Payment Required: Reserved for future use (sometimes used in APIs).
  • 403 Forbidden: You’re not allowed to see this, even if you’re logged in.
  • 404 Not Found: The most famous one — the page doesn’t exist.
  • 405 Method Not Allowed: You used the wrong method (GET instead of POST, etc.).
  • 406 Not Acceptable: The server can’t send data in the format you asked for.
  • 407 Proxy Authentication Required: You need to authenticate with a proxy first.
  • 408 Request Timeout: Your request took too long.
  • 409 Conflict: There’s a conflict with the current state of the resource (like uploading the same file twice).
  • 410 Gone: This page is gone and not coming back.
  • 411 Length Required: You need to include a content length in your request.
  • 412 Precondition Failed: A precondition in the request failed.
  • 413 Payload Too Large: You tried to upload something too big.
  • 414 URI Too Long: The URL you used is way too long.
  • 415 Unsupported Media Type: The server can’t handle the file type you sent.
  • 416 Range Not Satisfiable: You asked for a part of the file that doesn’t exist.
  • 417 Expectation Failed: The server can’t meet the expectations in the request headers.
  • 418 I’m a teapot: A joke status code (from an April Fool’s joke). Don’t take this seriously!
  • 421 Misdirected Request: The request was sent to the wrong server.
  • 422 Unprocessable Entity (WebDAV): The server understands it but can’t process it.
  • 423 Locked (WebDAV): The resource is locked.
  • 424 Failed Dependency (WebDAV): A previous request failed, so this one can’t continue.
  • 425 Too Early: Server is reluctant to process because it might be replayed.
  • 426 Upgrade Required: You need to switch to a different protocol.
  • 428 Precondition Required: Requires conditions to be set (for safe updates).
  • 429 Too Many Requests: You’re sending too many requests. Slow down!
  • 431 Request Header Fields Too Large: Your headers are too big.
  • 451 Unavailable For Legal Reasons: The content is blocked due to legal demands.

5xx – Server Error Codes

These are the server’s fault. Something went wrong on their side.

  • 500 Internal Server Error: Something broke on the server, but it’s not specific.
  • 501 Not Implemented: The server doesn’t support the request method.
  • 502 Bad Gateway: The server got an invalid response from another server.
  • 503 Service Unavailable: The server is down temporarily, usually for maintenance.
  • 504 Gateway Timeout: Another server took too long to respond.
  • 505 HTTP Version Not Supported: The server doesn’t support the HTTP version used.
  • 506 Variant Also Negotiates: Content negotiation error.
  • 507 Insufficient Storage (WebDAV): Server is out of space.
  • 508 Loop Detected (WebDAV): The server got stuck in a loop.
  • 510 Not Extended: More extensions are required to fulfill the request.
  • 511 Network Authentication Required: You need to log in to a network (common on public Wi-Fi).

Why Are HTTP Status Codes Important?

Understanding HTTP status codes isn’t just for developers.

They help anyone who runs a website, uses APIs, or simply browses the internet know what’s going on when things don’t load correctly.

They act like traffic signals for the internet:

  • Green light (2xx): All is well.
  • Yellow light (3xx): You’re being redirected.
  • Red light (4xx/5xx): Stop — something’s wrong.

Knowing what each code means can help you troubleshoot faster or communicate better with your developer or hosting provider.


Where Do You See HTTP Status Codes?

You usually don’t see them directly unless something breaks. Here’s where they show up:

  • In your browser: You might see a message like 404 Not Found or 403 Forbidden.
  • In browser dev tools (F12): Under the “Network” tab, you can see the exact status code returned by each request.
  • In SEO tools: Tools like Google Search Console show crawl errors and status codes.
  • In APIs: When developers build apps or websites, they often get status codes as responses from web services.

How Developers and Tools Use Status Codes

Developers rely on these codes to tell their apps what to do next. For example:

  • If a server returns 200 OK, the app might display the page.
  • If it returns 401, the app might show a login screen.
  • If it’s 500, it might trigger a fallback error message.

SEO and monitoring tools also use status codes to determine:

  • Which pages are indexed.
  • Which links are broken.
  • Whether a site is up or down.

Common HTTP Code Scenarios (Real-Life Examples)

Let’s make this more practical:

Situation Status Code What It Means
You successfully visit a blog post 200 OK The page loaded correctly
You click a broken link 404 Not Found That page doesn’t exist anymore
You try to access admin settings without login 401 Unauthorized You need to log in first
A website is overloaded 503 Service Unavailable The server is too busy or down for maintenance
A URL forwards you to another page 301 Moved Permanently You’re being redirected to a new location

Tips for Beginners Working with Status Codes

  • Bookmark 404s: If you run a website, check for broken links regularly.
  • Use Redirects Wisely: A 301 redirect helps search engines find your new content.
  • Test APIs or URLs: Use tools like Postman or browser extensions like “HTTP Header Live” to see status codes.
  • Enable Logging: If you manage a site, enable server logs to capture and review status codes.

How to Check HTTP Status Codes (Tools to Use)

Want to see what status codes your site or someone else’s site is returning? Try these free tools:

  • Browser Dev Tools (Network Tab)
  • Curl Command (Terminal)
    Example: curl -I https://example.com
  • Online Tools:
  • SEO Crawlers:
    • Screaming Frog SEO Spider
    • Ahrefs / SEMrush

HTTP Status Codes and SEO

Search engines like Google pay close attention to status codes when crawling and indexing websites:

  • 200 OK: Great! Your page can be indexed.
  • 301 Moved Permanently: Google will update to the new URL.
  • 404 Not Found: Not ideal — fix or redirect the broken link.
  • 500 Internal Server Error: Bad for SEO. Fix server problems ASAP.

Managing these correctly ensures better crawlability, indexing, and user experience.

Leave a Comment

Your email address will not be published. Required fields are marked *

Content Index
Scroll to Top