Troubleshooting

Website error codes explained: 403, 404, 500, 502, 503 and 504

What each common HTTP error code means, the usual cause on cPanel hosting or a VPS, and the first thing to check to get your website back online.

BeginnercPanel hosting3 min read

When a page fails, the server sends a three-digit status code that tells you where to look. Codes starting with 4 mean the request was refused or pointed at something missing; codes starting with 5 mean the server or the application behind it failed. This guide gives you the meaning and the first fix for each one.

Before you start

Quick reference

CodeMeaningMost common causeFirst check
403 ForbiddenServer refuses accessWrong file permissions, a Deny rule in .htaccess, missing index file, firewall blockFolders 755, files 644, review .htaccess
404 Not FoundNothing at that URLFile deleted or renamed, wrong document root, broken permalinksFile Manager path; re-save WordPress permalinks
500 Internal Server ErrorApplication or config crashed.htaccess syntax error, PHP fatal error, wrong PHP versionError log; rename .htaccess to test
502 Bad GatewayProxy got no valid reply from the backendPHP-FPM, Node or app container stopped or crashedRestart the backend; check its logs
503 Service UnavailableServer temporarily cannot handle the requestResource limit reached, maintenance mode, backend overloadedResource usage; stuck .maintenance file
504 Gateway TimeoutBackend answered too slowlySlow database queries, long PHP scripts, external API timeoutsSlow logs; raise timeouts only after fixing the slowness

403 Forbidden

  1. In cPanel → Files → File Manager, check permissions: folders 755, files 644, and never 777.
  2. Make sure the folder has an index.php or index.html.
  3. Look for Deny from or Require all denied lines in .htaccess.
  4. If only you see it, your IP may be blocked by the firewall; check with our IP checker and open a ticket.

Full walkthrough: Fix 403 Forbidden on cPanel.

404 Not Found

Confirm the file exists in the right folder (the addon domain's document root, not always public_html). On WordPress, go to Settings → Permalinks and click Save Changes. Details: Fix 404 Not Found.

500 Internal Server Error

Open cPanel → Metrics → Errors or the error_log file in the site folder; the last line usually names the problem. Temporarily rename .htaccess to .htaccess.bak; if the site comes back, the error is in that file. See Fix 500 Internal Server Error and, for WordPress, WordPress 500 error.

502 Bad Gateway and 504 Gateway Timeout

Both come from a proxy (LiteSpeed, Nginx, Cloudflare) talking to something behind it. A 502 means the backend is down or crashed; a 504 means it was too slow. On a VPS, check the service with systemctl status php8.3-fpm or docker ps. See Fix 502 Bad Gateway and Fix 504 Gateway Timeout.

503 Service Unavailable

  • Resource limits: on CloudLinux hosting, hitting the entry-process or CPU limit returns 503 or 508. Check cPanel → Metrics → Resource Usage and read 508 Resource Limit Reached.
  • Stuck maintenance mode: WordPress leaves a .maintenance file in the site root if an update is interrupted. Delete it.
  • Traffic spikes or bots: check the raw access log for one IP or URL hammering the site, and enable caching with LiteSpeed Cache.
  • VPS: the web server or PHP-FPM pool has no free workers. See PHP-FPM pool tuning.

Tip: If you use Cloudflare and see a Cloudflare-branded 52x page, the problem is between Cloudflare and your server. Test the site directly by temporarily pausing Cloudflare.

Still stuck?

Open a ticket at /tickets/new with the URL, the error code, the time it happened and what you already tried. MdmHost support is available 24/7.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.