Troubleshooting

HTTP Error Codes on KapsuleHost

What 403, 404, 500, 502, 503 and 504 actually mean on this platform, and the specific thing to do about each one.

An error code is not a generic failure message. It tells you which layer of the stack gave up, and that narrows the cause enormously. A 502 and a 504 look identical to a visitor and have completely different causes and fixes.

Reading the Actual Code

Before you troubleshoot, get the real number. A pretty error page can say one thing while the server returns another.

In your browser, open developer tools, go to the Network tab, reload the page, and click the first request. The status is at the top of the Headers panel.

From a terminal:

curl -sSI https://yourdomain.com/

That prints the status line and the response headers without downloading the page. The headers matter: several of the cases below are identified by a header rather than by the code alone.

The Short Version

CodeMeaningWhose problem
401Authentication requiredPassword protection is on
403Refused on purposeA security rule blocked the request
404Not foundYour site, usually routing
500Your application crashedYour code or a plugin
502The server behind the web server failedUsually your application
503Deliberately not serving right nowSuspended, paused or maintenance
504Took too longSomething in your code is slow

401 Unauthorized

You will see a browser username and password box rather than a page. That means basic password protection is enabled on the site or on that path.

Turn it off, or get the credentials, from Websites, the site, Advanced, then Password protection. See Password Protection.

Certificate renewal continues to work while password protection is on, so this will not break your HTTPS.

403 Forbidden

403 means something deliberately refused the request. On this platform there are four distinct sources.

The web application firewall. Every site sits behind a rules engine that inspects incoming requests and blocks ones matching known attack patterns. This is the most common source of an unexpected 403, and it is almost always a false positive on a legitimate but unusual request: a long form submission, a page builder saving complex content, a plugin posting raw code.

Symptoms of a firewall block: one specific action fails with 403 every time while the rest of the site is fine, and it fails identically in a different browser and on a different network.

The fix is a targeted rule exclusion, which support can add. Do not go looking for a switch to turn the firewall off; there is not one for shared hosting, and it would be the wrong fix anyway. Open a ticket with the exact URL, the exact time, and what you were doing. See Opening a Support Ticket.

Geo-blocking. If you have restricted your site to particular countries, everyone else gets a 403. Check Advanced, then Security. See Geo-Blocking.

An IP block. Either one you added yourself under Security, or a platform-level abuse block.

A file permission or symlink problem. Less common, and it usually shows up after a manual file operation over SSH.

404 Not Found

The server answered, but there is nothing at that address.

One page 404s. The file or the post genuinely is not there, or the URL is wrong.

Every page except the homepage 404s. This is a routing problem, and on WordPress it is nearly always permalinks. Important: Kapsule web hosting runs nginx, not Apache, so .htaccess rewrite rules do nothing here. If you migrated from a host that used them, that is your cause. See Permalink Issues and WordPress and .htaccess.

The whole site 404s. Check the site is pointed at the right document root and that your domain is attached to the right site. See Custom Domain for a Website.

It works on your machine and 404s live. Linux filenames are case sensitive. Logo.PNG and logo.png are two different files.

500 Internal Server Error

Your application ran and crashed. The web server is fine; the code is not.

This is the one case where the logs give you the answer almost immediately, because a PHP fatal error records the file and the line number that failed, which usually names the exact plugin.

  1. Go to Websites, the site, Advanced, then Logs.
  2. Look at the most recent entries.
  3. Match the timestamp to when you saw the error.

See Error Logs. For the WordPress-specific version of this, where the page is blank rather than showing an error, see The WordPress White Screen.

The most common causes are a plugin or theme incompatible with your PHP version, a memory limit reached, and a database connection failing. See PHP Extensions and Settings and WordPress Memory Limit.

502 Bad Gateway

The web server tried to hand the request to your application and got nothing usable back. The application process refused the connection or died mid-request.

Common causes:

  • A PHP process crashed, often from running out of memory on one request.
  • A Node.js application is not running, or crashed on startup.
  • A burst of traffic exhausted the available worker processes.

What to do: check the logs first, as above. If it is a Node application, check whether the process is actually up and look at its startup output. If 502s appear only at your busiest times, it is a capacity problem rather than a bug. See Site Slowness and Resource Limits.

A 502 from KPanel itself, while saving a setting, means something different. It means the panel could not apply the configuration change to the web server, and it rolled the change back rather than leaving your site half-configured. Your website is unaffected. Try again, and if it keeps failing, open a ticket.

503 Service Unavailable

503 means the server is deliberately not serving right now. There are three specific causes on this platform, and the response tells you which.

Your site is suspended. You will see a page headed "This site is paused". This is a billing or account state, not a technical fault, and the site comes straight back when the state clears. Check Billing. See Failed Payment and Account Suspended.

An Orbit project hit its spending cap. The response carries the header X-Orbit-Paused: spending-cap, and the page says the site has reached its monthly spending cap. This one confuses people because nothing is broken and no support ticket is needed. The project deliberately stopped serving so you would not get an unexpected bill.

To resume: go to Orbit, the project, Settings, then Spending cap, and raise the cap. Serving resumes once the change is picked up, which can take up to an hour. It also resumes automatically at the start of the next billing period. See Orbit Spending Caps.

Platform maintenance. A whole-platform maintenance page, which is rare and announced. Check Status and Uptime.

504 Gateway Timeout

Your application was still working when the web server ran out of patience. Nothing crashed. It was just too slow.

Typical causes:

  • A long-running import, export, backup or bulk operation run through the browser.
  • A plugin calling a slow external API on every page load.
  • An expensive database query with no index behind it.
  • A cron task being triggered by a page view rather than by real cron.

What to do:

  1. Identify which request is slow. The APM tab on WordPress sites shows you. See Site Performance.
  2. For long operations, use the command line rather than the browser. See WP-CLI.
  3. Move scheduled work to real cron. See Cron Jobs.
  4. Raise max_execution_time if the work genuinely needs longer, though this is a workaround rather than a fix. See PHP Extensions and Settings.

Note the difference: if PHP hits its own execution limit first you get a 500, not a 504. Both mean "too slow", at different layers.

No Response At All

Sometimes there is no error code, because there is no response. The connection just hangs and eventually times out.

If that happens from one network but the site works from another, and especially from a phone on mobile data, the most likely cause is an automatic abuse block: a burst of errors or failed logins from your address triggered a temporary network-level ban. These clear on their own, usually within an hour. If you need it lifted sooner, contact support with the IP address you are connecting from.

Custom Error Pages

You can replace the default error page for 400, 401, 403, 404, 500, 502, 503 and 504 with your own HTML, under Websites, the site, Advanced, then Error pages. Kapsule supplies branded defaults for 404, 500, 502, 503 and 504 if you do not.

One thing worth knowing: a custom error page keeps the real status code. A custom 404 still returns 404. Serving your error page with a 200 status is a classic way to destroy your search rankings, and it is deliberately not possible here. See Custom Error Pages.

Related Guides

Still need help?

Email us at support@kapsulehost.com or open a chat in KPanel.

Open KPanel
HTTP Error Codes on KapsuleHost