Can I Override the 404 pages?

Is it possible to have customized 404 (Page not found) pages?

I was hoping that overriding themes/base/admin/resources/partials/pagenotfound.html and themes/base/admin/resources/partials/notfound.html would do the trick but not.


We do this with our reverse proxy. When Keycloak returns a 404 HTTP status, we return a custom page.

1 Like

Hi, I was able to override the “Page Not Found” by simply customizing a theme that overrides the error.ftl file and setting it as the master realm login theme.

In error.ftl I made a validation taking the message.summary == ‘Page not found’.

1 Like