Menu

Creating a custom 404 error page in Umbraco

Updated: July 15, 2011

Ali Taheri

Here I show you how to create a custom 404 page in Umbraco with a proper 404 HTTP header.

  1. Create a page for 404 in the content section.
  2. In "/config/umbracoSettings.xml" modify <error404>1</error404> with the page ID. (This can be found in the page's properties tab.)
  3. In your web.config (system.webServer section), copy and paste the following code:

 

<httpErrors errorMode="Custom">
    <remove statusCode="404" subStatusCode="-1" />
    <error statusCode="404" prefixLanguageFilePath="" path="/non-existing-page.aspx"
              responseMode="ExecuteURL" />
</httpErrors>

Tags

Umbraco
comments powered by Disqus

© 2017 - Ali Sheikh Taheri