Skip to content

Custom Error Pages

When a request can’t be served — your server is down, a page doesn’t exist, a rule blocked the visitor — someone has to show a page. An error page rule decides who.

ModeWhat the visitor sees
nsin pagensin’s own error page. Works even when your server is completely unreachable. This is the default.
Your own pageHTML you provide, served by nsin. Also works when your server is down.
Pass throughYour server’s own error response, unchanged. Only possible when your server actually answered.
  1. Go to RulesAdd RuleError Page.
  2. Pick the status codes the rule covers — for example 404, or 502, 503, 504 together.
  3. Pick the mode.
  4. For your own page, paste the HTML for each code. You can also provide one fallback page used for any covered code that doesn’t have its own.
  5. Optionally limit the rule to certain paths.
  6. Save.

The HTML is served by nsin from its edge, so keep it self-contained: inline your CSS and avoid loading images, fonts or scripts from your own server — during an outage those requests fail too, and your nice error page arrives unstyled.

A good error page says what happened in plain language, tells the visitor what to try next, and doesn’t blame them.

  • 404 — the address doesn’t exist. Usually best passed through to your server, which knows what the site contains.
  • 403 — refused. This is what a block rule returns.
  • 429 — too many requests, from rate limiting.
  • 502 / 503 / 504 — your server didn’t answer, or answered too slowly. These are the ones worth customising: your server can’t render them itself.

My custom page doesn’t show up. Check that the rule covers that status code and that its paths match. If the mode is pass through, your server’s page is being used on purpose.

Can I redirect instead of showing a page? For errors, no — and you shouldn’t want to. A redirect turns an error into a 200 OK somewhere else, which confuses browsers and search engines. Show the error, and offer a link.

Visitors saw an nsin page during an outage. That’s the fallback working: your server was unreachable, so nsin answered. Set up your own page for 502/503/504 if you’d rather they saw your branding, and see Uptime for what happened.