<?php
require_once __DIR__ . '/../../config.php';
require_once __DIR__ . '/../../includes/functions.php';

$page_title   = 'HTTP Status Codes – 200, 301, 404, 500 and More Explained';
$page_desc    = 'All important HTTP status codes explained: 1xx, 2xx, 3xx, 4xx and 5xx – what they mean and when they occur on ipcheck.tools.';
$page_current = 'wissen';

require_once __DIR__ . '/../../en/header.php';
?>

<div class="hero">
  <div class="hero-label">Knowledge</div>
  <div class="hero-title">HTTP Status Codes</div>
  <div class="hero-sub">What 200, 301, 404 and 500 mean – all codes explained</div>
</div>

<div class="wrap">

  <div class="ad-slot"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8287576653347400" data-ad-slot="2715725452" data-ad-format="auto" data-full-width-responsive="true"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div>

  <?php
  $groups = [
    ['1xx – Informational', 'var(--blue-dim)', [
      ['100', 'Continue', 'Server received request headers, client should proceed'],
      ['101', 'Switching Protocols', 'Server is switching to a different protocol (e.g. WebSocket)'],
    ]],
    ['2xx – Success', 'var(--green)', [
      ['200', 'OK', 'Request succeeded – standard response for successful requests'],
      ['201', 'Created', 'Request succeeded and a new resource was created'],
      ['204', 'No Content', 'Request succeeded but no content to return'],
      ['206', 'Partial Content', 'Partial resource delivered (used for range requests)'],
    ]],
    ['3xx – Redirection', 'var(--orange)', [
      ['301', 'Moved Permanently', 'Resource permanently moved to a new URL'],
      ['302', 'Found', 'Resource temporarily moved to a different URL'],
      ['304', 'Not Modified', 'Resource has not changed – use cached version'],
      ['307', 'Temporary Redirect', 'Temporary redirect – method must not change'],
      ['308', 'Permanent Redirect', 'Permanent redirect – method must not change'],
    ]],
    ['4xx – Client Errors', 'var(--red)', [
      ['400', 'Bad Request', 'Server cannot process the request due to invalid syntax'],
      ['401', 'Unauthorized', 'Authentication required'],
      ['403', 'Forbidden', 'Server understood request but refuses to authorize it'],
      ['404', 'Not Found', 'The requested resource could not be found'],
      ['405', 'Method Not Allowed', 'HTTP method not allowed for this resource'],
      ['408', 'Request Timeout', 'Server timed out waiting for the request'],
      ['410', 'Gone', 'Resource permanently deleted and no forwarding address'],
      ['429', 'Too Many Requests', 'Rate limit exceeded – too many requests in a given time'],
    ]],
    ['5xx – Server Errors', 'var(--purple)', [
      ['500', 'Internal Server Error', 'Generic server error – something went wrong'],
      ['501', 'Not Implemented', 'Server does not support the requested method'],
      ['502', 'Bad Gateway', 'Server acting as gateway received an invalid response'],
      ['503', 'Service Unavailable', 'Server temporarily unavailable – overloaded or maintenance'],
      ['504', 'Gateway Timeout', 'Upstream server did not respond in time'],
      ['505', 'HTTP Version Not Supported', 'Server does not support the HTTP version used'],
    ]],
  ];
  foreach ($groups as [$title, $color, $codes]):
  ?>
  <div class="card">
    <div class="card-title" style="color:<?= $color ?>;"><i class="ti ti-world"></i> <?= $title ?></div>
    <table class="result-table">
      <thead><tr><th style="width:60px;">Code</th><th style="width:200px;">Name</th><th>Description</th></tr></thead>
      <tbody>
        <?php foreach ($codes as [$code, $name, $desc]): ?>
        <tr>
          <td><span class="badge" style="background:<?= $color ?>22; color:<?= $color ?>; border:1px solid <?= $color ?>44;"><?= $code ?></span></td>
          <td style="font-weight:500; color:var(--text2);"><?= $name ?></td>
          <td style="font-size:12px; color:var(--text4);"><?= $desc ?></td>
        </tr>
        <?php endforeach; ?>
      </tbody>
    </table>
  </div>
  <?php endforeach; ?>

  <div class="card">
    <div class="card-title"><i class="ti ti-arrow-right"></i> Check HTTP headers live</div>
    <div style="display:flex; gap:8px; flex-wrap:wrap;">
      <a href="/en/headers.php" class="btn btn-primary" style="font-size:12px; padding:6px 14px;">
        <i class="ti ti-eye"></i> HTTP Header Viewer
      </a>
      <a href="/en/erreichbarkeit.php" class="btn btn-ghost" style="font-size:12px; padding:6px 14px;">
        <i class="ti ti-antenna"></i> Availability Check
      </a>
      <a href="/en/ssl-check.php" class="btn btn-ghost" style="font-size:12px; padding:6px 14px;">
        <i class="ti ti-lock"></i> SSL Check
      </a>
    </div>
  </div>

  <div class="ad-slot"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-8287576653347400" data-ad-slot="2715725452" data-ad-format="auto" data-full-width-responsive="true"></ins><script>(adsbygoogle = window.adsbygoogle || []).push({});</script></div>

  <div class="tools-row">
    <a href="/en/knowledge/" class="tool-btn"><i class="ti ti-book"></i><span>Knowledge</span></a>
    <a href="/en/headers.php" class="tool-btn"><i class="ti ti-eye"></i><span>HTTP Headers</span></a>
    <a href="/en/erreichbarkeit.php" class="tool-btn"><i class="ti ti-antenna"></i><span>Availability</span></a>
    <a href="/en/ssl-check.php" class="tool-btn"><i class="ti ti-lock"></i><span>SSL Check</span></a>
    <a href="/en/"           class="tool-btn"><i class="ti ti-home"></i><span>My IP</span></a>
  </div>

  <div class="seo-box">
    <h2>HTTP status codes – server responses explained</h2>
    <p>HTTP status codes are three-digit numbers that servers send in response to browser requests. They are grouped into five classes: 1xx (informational), 2xx (success), 3xx (redirection), 4xx (client errors) and 5xx (server errors). The most common codes are 200 (OK), 301 (permanent redirect), 404 (not found) and 500 (internal server error). Understanding status codes helps diagnose web issues and is essential for web development and SEO.</p>
  </div>

<?php require_once __DIR__ . '/../../en/footer.php'; ?>
