Brad Tilton
ServiceNow Employee
ServiceNow Employee
 Center of Excellence / UI Builder / Custom 404 Pages

 

 

This guide will walk you through the steps to set a custom 404 page in your UI Builder experience. 

 

image


I have a portal experience for a recipe app I built you can see below.

find_real_file.png

(If you're curious about how this was built, check out the CreatorCon lab CCL1072 - Building a Killer Experience with UI Builder)

This is nice, but if I try to navigate to a page that doesn't exist I get the default 404 page, which isn't really suitable for my experience. 

find_real_file.png

 I have created a new page I want to use as a 404 page and named it custom-404.

find_real_file.png

So how do I show my beautiful new 404 page instead of the default page with the banner at the top?


Setting a Custom 404 Page Steps

  1. With my Recipe DB experience open in UI Builder, I'll go to Menu > Edit experience settings.
  2. In the Settings panel that comes up, I'm going to click Advanced settings.
  3. This opens up the UX Page Registry [sys_ux_page_registry] record for my experience, and I'll now add a custom404 property to the Auth Routes JSON with the name of my page custom-404 as the value.
    find_real_file.png

Now if I go back and test with the bad url I used I'll get the new custom 404 page.

find_real_file.png

 

Have another topic you'd like to see in our UI Builder resource hub? Let us know in the comments!

Comments
Arnoud Kooi
ServiceNow Employee
ServiceNow Employee

Great lab!

Could it be the Home and Recipe UI Builder pages are not in the GitHub repo branches?

Brad Tilton
ServiceNow Employee
ServiceNow Employee

I believe they are in the later branches, but this article is showing how to set a 404 page and isn't specific to the UIB lab.

Version history
Last update:
‎12-08-2022 10:53 AM
Updated by:
Contributors