• Home /
  • Blog /
  • How to create a custom 404 page in Umbraco 8
How To Create 404 Page In Umbraco

How to create a custom 404 page in Umbraco 8

When you develop a new website using Umbraco, you may notice that the 404 page is intentionally left ugly and you need to make sure it does have some lovely template.

Default Umbraco 404 page is intentionally left ugly

It is possible and straightforward to create a great 404 page in Umbraco using just Umbraco CMS. It means that you do not need any web.config changes like you usually do in the ASP.NET MVC application, Umbraco already has build-in support for the 404 error page.

To create a 404 page for your Umbraco website you need to create a new document type (in fact you may use existing document type but point it to the different template).

Create a new document type to have a custom 404 page in Umbraco

Next, you need to update the 404 template and add all the required styles and content there.

Update 404 page template and include styles to make it user friendly

After the template is ready, you need to Create a 404 content page and make sure it is not visible in the navigation.

Create a new 404 content page in Umbraco

After you saved the page, you are going to get a page ID, which you can find either in URL or on the Info tab like on the screenshot below.

Where to find Umbraco Page ID

With that ID, you need to open UmbracoSettings.Config file and update <error404> tag with the ID of your page.

Update UmbracoSettings.Config file with the new 404 page ID

As you see from the documentation, you can assign different 404 pages for different languages

Now if you try to access any page which does not exist you are going to get a friendly 404 page which using your template

User friendly 404 error page in Umbraco

Also, Umbraco also taking care of the response code which the browser gets back, it is a correct 404 Page not found code, so you should not have issues with search engines.

Umbraco returns correct 404 code to browser

Alex Shapovalov

Alex Shapovalov is a founder of Yaplex - an IT consulting and software development company, located in Mississauga, Ontario. Alex provides IT consulting and .NET software development services in Canada and the USA.

Yaplex - Freelance developer - white logo on black background

Yaplex ® is a custom software development company located in Mississauga, Ontario. Yaplex was founded in 2013 and provides website development, mobile development, and custom .NET software development services.

Contact Information

Mississauga, ON, Canada
Phone: +1 647 328 3809
Email: hello@yaplex.com