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.
The three modes
Section titled “The three modes”| Mode | What the visitor sees |
|---|---|
| nsin page | nsin’s own error page. Works even when your server is completely unreachable. This is the default. |
| Your own page | HTML you provide, served by nsin. Also works when your server is down. |
| Pass through | Your server’s own error response, unchanged. Only possible when your server actually answered. |
Create an error page rule
Section titled “Create an error page rule”- Go to Rules → Add Rule → Error Page.
- Pick the status codes the rule covers — for example
404, or502,503,504together. - Pick the mode.
- 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.
- Optionally limit the rule to certain paths.
- Save.
Writing your own page
Section titled “Writing your own page”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.
Which codes matter
Section titled “Which codes matter”- 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.
Common questions
Section titled “Common questions”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.