wp2shell: more than a month later. Confirm 6.8.6, 6.9.5, 7.0.2. Patched is not clean.

Read the advisory

HTTP error codes: what they mean and how to fix them

What an HTTP error means, common codes (404, 403, 500, 502, 504), and practical WordPress fixes. Read the number, check the right logs, fix the client or server path.

Topics Beginner guides

Lars Koudal

Lars Koudal

Updated Published

An HTTP error is a status code that means the request did not succeed the way the browser expected. Common ones are 404, 403, 500, 502, and 504. The three-digit number tells you whether the problem looks like the client’s fault or the server’s.

Understanding HTTP error codes

For WordPress owners, these codes show up in the browser, host logs, CDNs, and uptime monitors. Fixing them fast keeps visitors and crawlers happy. Security angle: some 403/429 patterns come from a WAF or rate limiting. Firewall context: Cloud Firewall.

Status code families

RangeMeaning
2xxSuccess
3xxRedirect
4xxClient problem (bad URL, auth, forbidden, not found)
5xxServer problem (crash, bad gateway, timeout)

People say “HTTP error” for most non-2xx responses. Redirects (3xx) are status codes too, but they are not failures unless they loop or point at the wrong place.

Common 5xx codes

500 Internal Server Error

Something broke on the server: PHP fatal error, bad plugin/theme update, exhausted memory, or a broken config. Check recent changes. Review PHP and server error logs. On WordPress, disable the last change (plugin/theme) or restore from backup to isolate. Hosting help is fair game if logs are unclear.

502 Bad Gateway

A proxy, CDN, or load balancer got a bad response from upstream (PHP-FPM, Node, another origin). Check origin health, DNS, and proxy settings. Restart the app stack if you control it. Clear CDN cache after a fix if stale errors linger.

504 Gateway Timeout

Upstream was too slow. Causes include heavy queries, overloaded CPU, network issues, or timeout values that are too tight. Optimize the slow path, scale resources, or raise timeouts carefully after you know why the work is slow. Sometimes a firewall or bot flood is part of the load story.

Common 4xx codes

404 Not Found

The URL does not exist (typo, deleted post, bad rewrite). Fix the link, restore the content, or add a proper redirect. Broken links waste SEO and trust. For noisy 404 probing by bots, see 404 hammering.

401 Unauthorized

Authentication is missing or wrong. Check login, cookies, tokens, or Basic Auth configuration.

403 Forbidden

The server understood the request but refuses it. Causes include file permissions, .htaccess rules, host security, geo/IP blocks, or WAF rules. Review permissions and security rules before assuming the site is “down.”

429 Too Many Requests

Rate limiting kicked in. Legitimate spikes (sales, campaigns) may need higher limits. Bot abuse needs tighter ones. Tune rather than guessing.

Redirect and site barrier

Redirects (3xx)

Redirects are normal when URLs move. Wrong ones create loops and SEO confusion.

  • 301: permanent move (usual SEO choice)
  • 302 / 307: temporary
  • 308: permanent, stricter about keeping the request method

Monitor redirect chains. Prefer one clean hop from old URL to new.

Useful 2xx codes (for context)

  • 200: OK, body returned
  • 201: created (common after POST)
  • 204: success, no body
  • 206: partial content (range requests for large files)

How to see the real code

  1. Browser error page (sometimes simplified)
  2. DevTools → Network tab (exact status per request)
  3. Server access/error logs
  4. Application or WordPress debug logs
  5. CDN / proxy dashboards

Online checkers (Search Console crawl stats, Pingdom, GTmetrix) help spot patterns. Browser extensions can show status codes while you click through the site. Install only what you need.

Fix workflow

  1. Identify the exact code and URL
  2. Decide 4xx vs 5xx vs redirect
  3. For 5xx: logs, recent deploys, plugin/theme rollback, host resources
  4. For 4xx: URL, auth, permissions, WAF/rate-limit rules
  5. For redirects: chains, http vs https, www vs apex
  6. Prevent repeats: backups, monitoring, fewer surprise plugins

WordPress hardening that reduces “mystery 500 after update” incidents: security checklist and hardening guide.

If unexplained 403 or 429 responses keep hitting real visitors, check whether a WAF or firewall rule is too aggressive. Cloud Firewall in Security Ninja Pro can help you see and tune that traffic without guessing from a blank error page. Loud 404 scanner noise that burns hosting resources: 404 Guard and why 404s can spike your hosting bill.

Bottom line

HTTP status codes are a map, not a mystery. Read the number, check the right logs, and fix the client path or the server path. Keep backups and monitoring so the next 500 is a short outage, not a guessing game.

Found this useful? Share it.

Frequently asked questions

What is an HTTP error?+

An HTTP error is a status code that means the request did not succeed the way the browser expected. Common ones are 404 (not found), 403 (forbidden), 500 (server error), 502 (bad gateway), and 504 (gateway timeout).

What does an HTTP error mean?+

It means the server returned a three-digit status instead of a normal success response. 4xx codes usually point at the URL, auth, or permissions. 5xx codes usually point at the server, app, proxy, or timeout. The exact number tells you where to look first.

What is a 500 internal server error?+

Something broke on the server: a PHP fatal error, bad plugin or theme update, exhausted memory, or broken config. Check recent changes and PHP or server error logs. On WordPress, disable the last change or restore from backup to isolate the cause.

What is a 502 bad gateway?+

A proxy, CDN, or load balancer got a bad response from upstream (PHP-FPM, Node, or another origin). Check origin health, DNS, and proxy settings. Restart the app stack if you control it, then clear CDN cache if stale errors linger.

How do I fix HTTP and HTTPS errors on WordPress?+

Identify the exact status code and URL in DevTools or logs. For 5xx, check recent deploys, plugin or theme rollbacks, and host resources. For 4xx, check the URL, auth, permissions, and WAF or rate-limit rules. For redirect loops, fix chains and http vs https or www vs apex.

Larger screenshot