HTTP status codes
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.
knowledge
- Read time
- 5 min
- Sections
- 4
- Updated
- 14 Nov 2026
- Written by
- WebJi® team
Last editorial update: 14 November 2026. Prices follow the dated sources on this page; checkout confirms current charges.
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.
| Class | Meaning | Browser | Search engines |
|---|---|---|---|
| 1xx | Informational (100 Continue, 101 Switching Protocols, 103 Early Hints) | Handled silently | Not indexed as pages |
| 2xx | Success (200 OK, 201 Created, 204 No Content) | Shows the page | 200 is what a canonical page should return |
| 3xx | Redirection (301, 302, 304, 307, 308) | Requests the Location URL | Target may be indexed; 304 is a cache check |
| 4xx | Client error (400, 401, 403, 404, 410, 429) | Shows an error page | URLs drop from the index, except 429 |
| 5xx | Server error (500, 502, 503, 504) | Shows an error page | Google 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.
| Code | Intent | Request method kept? | Typical use |
|---|---|---|---|
| 301 Moved Permanently | Permanent | Browsers may change POST to GET | Page or domain moves, HTTP to HTTPS |
| 308 Permanent Redirect | Permanent | Yes | Permanent moves of form or API endpoints |
| 302 Found | Temporary | Browsers may change POST to GET | Short campaigns, A/B tests |
| 307 Temporary Redirect | Temporary | Yes | Temporary moves where POST must stay POST |
| 304 Not Modified | Cache validation | Not applicable | Repeat 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.
| Code | Usual cause | First check |
|---|---|---|
| 400 Bad Request | Malformed request, oversized cookie or header | Clear cookies for the site and retry |
| 401 Unauthorized | Login required and not supplied or rejected | Credentials, or remove protection from public pages |
| 403 Forbidden | File permissions, deny rule, WAF or firewall block | Permissions (644/755) and recent security rules |
| 404 Not Found | Nothing at that path | Restore the page or 301 it to the replacement |
| 405 Method Not Allowed | Wrong HTTP method for the endpoint | Form or API sending GET instead of POST |
| 410 Gone | Removed deliberately | Use only when the URL should drop permanently |
| 429 Too Many Requests | Rate limit triggered | Slow 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.
| Code | Usual cause | Hosting capacity involved? | Fix guide |
|---|---|---|---|
| 500 Internal Server Error | PHP fatal, bad .htaccess, wrong permissions | Rarely | 500 error on cPanel |
| 502 Bad Gateway | PHP-FPM crashed or returned an invalid reply | Sometimes, when workers are exhausted | 502 fix |
| 503 Service Unavailable | Maintenance mode, overload, resource limits | Often on shared plans at peak | 503 fix |
| 504 Gateway Timeout | Slow database or script exceeding the proxy timeout | Yes, when every worker is busy | 504 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.
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.
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.