Customize HTTP error pages
Override the error template while preserving the response status.
Inspect error.tpl and the current error controller in the installed base module. Add a site template override under priv/templates, preserving the variables and blocks used by that version.
Keep the error page small and self-contained. It must work when a resource is missing or another part of rendering has failed. Avoid database-heavy widgets, private exception details and assumptions that id exists. Offer a homepage link or a simple recovery action.
Test an unknown URL as a logged-out visitor and inspect the HTTP response: the page should still return 404, not 200 or a redirect to a successful page. Test the deployment's generic server-error response in acceptance; do not deliberately crash production to preview it.
Error responses generated by an outer proxy need their own configuration. A Zotonic template cannot customize a response that never reaches Zotonic.