Can I override 404 pages?

Is it possible to have customized error pages for fat-fingered user entered URLs? Which xml files would have to override in order to catch 404 in these 2 conditions:

Assume that kcIP kcPort gcIP and gcPort are the actual ip:port properly functioning and xyz is a mistyped “auth” or “oauth” accordingly

keycloak: https://kcIP:kcPort/xyz
I receive the following page back: “404 - Not Found

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

gatekeeper
https://gcIP:gcPort/xyz
I receive the following page back:
"Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Mon Mar 16 21:03:09 GMT 2020
There was an unexpected error (type=Not Found, status=404).
No message available"

Thanks!

Ricky

Any ideas anyone ? Thanks!

Hi @ricky , I’m with the same problem working with keycloak 18.0.2. Did you found how to override the 404 Pages?

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’