21+ years in hosting · Jaipur, India · INR billing with 18% GST · 24/7 email support
Blog · WebJi® India

HTTP status codes

Quick answer

An HTTP status code is the three-digit number a server sends at the start of every response. The first digit sets the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error. Browsers and search engines act on it, so a moved page needs a 301 and maintenance needs a 503.

For site owners, developers and SEOs diagnosing redirects, broken pages and server errors from the status code a URL returns.

GuideWebJi®
knowledge
Read time
5 min
Sections
4
Updated
14 Nov 2026
Written by
WebJi® team

What are HTTP status codes and their five classes?

An HTTP status code is the three-digit number a server returns first in every response; the first digit sets the class: 1xx informational, 2xx success, 3xx redirection, 4xx client error and 5xx server error. The meanings are standardised in RFC 9110, published in 2022.

HTTP status classes, browser behaviour and search impact
ClassMeaningBrowserSearch engines
1xxInformational (100 Continue, 101 Switching Protocols, 103 Early Hints)Handled silentlyNot indexed as pages
2xxSuccess (200 OK, 201 Created, 204 No Content)Shows the page200 is what a canonical page should return
3xxRedirection (301, 302, 304, 307, 308)Requests the Location URLTarget may be indexed; 304 is a cache check
4xxClient error (400, 401, 403, 404, 410, 429)Shows an error pageURLs drop from the index, except 429
5xxServer error (500, 502, 503, 504)Shows an error pageGoogle slows crawling; long outages drop URLs

Watch for soft errors: an error template that still returns 200. Visitors see a failure while crawlers see success, which Search Console reports as "Soft 404".

How do you check the status code of a URL?

Run curl -I against the URL, or open browser DevTools → Network and read the Status column; both show the real code rather than what the page appears to say. Check the exact URL, including trailing slash and protocol.

# status line and headers only
curl -I https://example.in/old-page/

# follow redirects and print each hop's code
curl -sIL https://example.in/old-page/ | grep -iE '^(HTTP|location)'

# just the final code
curl -o /dev/null -s -w "%{http_code}\n" https://example.in/

Search Console's URL Inspection tool shows the status Googlebot received, which can differ from yours if a firewall or CDN treats bots differently.

How do 301, 302, 307, 308 and 304 differ for SEO?

301 and 308 mean the URL moved permanently, so search engines consolidate signals on the target; 302 and 307 mean temporary, so the original URL may stay indexed; 304 is not a redirect but a "your cached copy is still valid" reply. Send the code that matches your real plan.

Redirect and cache codes compared
CodeIntentRequest method kept?Typical use
301 Moved PermanentlyPermanentBrowsers may change POST to GETPage or domain moves, HTTP to HTTPS
308 Permanent RedirectPermanentYesPermanent moves of form or API endpoints
302 FoundTemporaryBrowsers may change POST to GETShort campaigns, A/B tests
307 Temporary RedirectTemporaryYesTemporary moves where POST must stay POST
304 Not ModifiedCache validationNot applicableRepeat visits to unchanged files

Google may treat a long-lived 302 as permanent, but relying on that is guesswork. Avoid chains: point each old URL directly to the final one. Rule syntax is in creating a 301 redirect in .htaccess.

What causes 4xx client errors, and how do you fix them?

A 4xx code means the server refused or could not match this particular request, because of the URL, credentials, permissions or request rate; fix the request or the rule that refuses it rather than restarting the server.

Common 4xx codes, causes and first checks
CodeUsual causeFirst check
400 Bad RequestMalformed request, oversized cookie or headerClear cookies for the site and retry
401 UnauthorizedLogin required and not supplied or rejectedCredentials, or remove protection from public pages
403 ForbiddenFile permissions, deny rule, WAF or firewall blockPermissions (644/755) and recent security rules
404 Not FoundNothing at that pathRestore the page or 301 it to the replacement
405 Method Not AllowedWrong HTTP method for the endpointForm or API sending GET instead of POST
410 GoneRemoved deliberatelyUse only when the URL should drop permanently
429 Too Many RequestsRate limit triggeredSlow the client; Google treats it like a server error

Detailed fixes: 403 Forbidden and WordPress 404 errors.

What causes 5xx server errors, and when is hosting to blame?

A 500 usually comes from the application, such as a PHP fatal error or a broken .htaccess; 502 and 504 usually mean a proxy could not get a timely answer from PHP or another upstream; 503 means the service is deliberately or temporarily unavailable. Read the error log before changing plans.

Common 5xx codes and where to look
CodeUsual causeHosting capacity involved?Fix guide
500 Internal Server ErrorPHP fatal, bad .htaccess, wrong permissionsRarely500 error on cPanel
502 Bad GatewayPHP-FPM crashed or returned an invalid replySometimes, when workers are exhausted502 fix
503 Service UnavailableMaintenance mode, overload, resource limitsOften on shared plans at peak503 fix
504 Gateway TimeoutSlow database or script exceeding the proxy timeoutYes, when every worker is busy504 fix

A pattern of 503 or 504 only during sales, with 200 at quiet hours, points to worker or database capacity. That is when a VPS with reserved resources, such as WebJi® VPS hosting from ₹499 a month before 18% GST, is worth considering.

Which status code should a site return during maintenance?

Return 503 Service Unavailable with a Retry-After header during planned maintenance, so search engines treat the downtime as temporary and come back later. A maintenance page that returns 200 risks being indexed in place of your real content.

Keep maintenance short: Google's documentation notes that URLs returning server errors for an extended period can be dropped from the index. Most WordPress maintenance plugins send 503 correctly; confirm with curl -I while the mode is on.

FAQ

Frequently asked questions

Should I use 404 or 410 for deleted pages?

Both remove a URL from the index over time. A 410 states the removal is deliberate and may be processed slightly faster. If a close replacement exists, a 301 to it is better than either, because it keeps visitors and signals.

Do 404 errors hurt my whole site's rankings?

No. 404s for pages that never existed or were removed are normal and do not harm other pages. Fix 404s on URLs that have backlinks or internal links, and on pages that should exist, because those lose visitors and value.

What does status code 418 mean?

"418 I'm a teapot" began as an April Fools' joke in a 1998 RFC about coffee pots. Some services use it humorously, but it is not a meaningful error for websites and should not be used for real responses.

Why does my page return 200 to me but an error to Google?

A firewall, security plugin or CDN rule may block or rate-limit bots, or the server may be slow when Googlebot crawls. Use URL Inspection's live test in Search Console and check firewall logs for blocked crawler requests.

Status semantics per RFC 9110; search behaviour per Google Search Central documentation · Reviewed by the WebJi® team, Jaipur.

WebJi® since 2005

Ready to get started with WebJi®?

Join 12,000+ businesses across India and overseas. INR pricing, 18% GST shown before payment and 24/7 email support in Hindi and English — average first reply under 60 minutes.