x First time here? Check out the FAQ

Come work for Umbraco - The Umbraco HQ are hiring Project managers, .NET developers and DevOps people!

Configuring 404 pages

    Out of the box, umbraco displays a standard 404 message, which does not make much sense to your end-users. it is therefore important that you change that page.

    A 404 page can be any page in your umbraco installation and umbraco will simply render that page instead of the missing page, it will not redirect to another Url, so urls will stay the same, but the content rendered will be different

    Set a standard 404 page

    Open the configuration file /config/umbracosettings.config and look for the element <errors> which by default will look like this:

    <errors>
       <!-- the id of the page that should be shown if the page is not found -->
       <!--        <errorPage culture="default">1</errorPage>-->
       <!--        <errorPage culture="en-US">200</errorPage>-->
       <error404>1826</error404> </errors>

    The <error404> element contains a number, this number is the node ID of the page you would like to render instead of the missing page. Simply find the page in the umbraco content section, look on the properties tab for ID, and insert it in the configuration file.

    Set a culture dependant error page

    For umbraco installations running multiple sites, it is not enough to just have a single error page, as that would mix the languages and sites when users cannot find a page. the <errors> element therefor also contain the option to add a <errorPage culture="en-US"> element, also containing a node ID. 

    By specifying the culture on the <errorPage> element you tell umbraco what page to render, in case a page is not found, and the culture is equal to the culture ID. The culture ID is set as part of configuring hostnames on your content. 

    IIS 7.5+

    You may find that you don't get your error pages and IIS takes over. To get Umbraco to handle your errors for 404 insert the following element before the end of the system.webServer section of the web.config.

    <httpErrors existingResponse="PassThrough"/>

    Now the errors you configured in the umbracosettings.config should display.