Pages supports custom 404 pages, giving you full control over the layout and content visitors see when they hit a missing URL. To create a 404 page, you will need to:
- Create a custom 404 entity
- Create a page group for the 404 page
- Add a 404 Redirect URL
Create a custom 404 entity
A custom 404 page needs to be scoped to an entity, just like any other page in Pages. Create a dedicated entity to serve as its anchor.
Navigate to Knowledge Graph > Entities.
-
Follow the steps to Add a Single Entity.
There are no special requirements for this entity. However, you can add specific fields to this entity if you plan to pull field data into your 404 page layout.
Create or Update a Page Group for the 404 page
You will create or update the configuration of a page group so that the page is scoped to the 404 entity that you created.
Create a Page Group
- Navigate to Pages > [Your Site] > Page Groups.
- Click + Create Page Group.
- Fill out the page group settings. The Entity Scope should be set to the Entity Type and Entity that you created.
- Click Create Page Group.
Update a Page Group
- Navigate to Pages > [Your Site] > Page Groups.
- Next to the page group you want to edit, select the menu icon.
- Click Configure Page Group.
- Edit the Entity Scope. It should be set to the Entity Type and Entity that you created.
You can learn more about creating and updating pages with the following documentation:
Add a 404 Redirect URL
When you add a 404 Redirect URL, any broken or invalid URLs will be directed to a page of your choice.
- Navigate to Pages > [Your Site] > Site Configuration.
- Find the 404 Redirect URL field. Paste in the full URL of your custom 404 page.
- Save your changes.