MOVED AND MISSING WEB PAGES

Anyone who has been creating websites for more than five minutes has had to deal with pages that can't be found, pages that have moved, and pages that have been renamed. Various strategies exist for dealing with these constants in web development, but Umbraco provides some very simple and flexible methods for dealing with and managing these ever-present conditions.

404 Pages

Umbraco provides a very simple way to specify the page to be displayed when a 404 (page not found) error is encountered. In the /config/umbracoSettings.config file, set the error404 key value to the ID of the Umbraco node to use as your page to display when a 404 error is encountered. A good practice is to create a helpful 404 page that contains site navigation and perhaps a search form for your site. When your site visitors encounter this, as opposed to a generic web server 404 page, they are much more likely to find the page they had originally intended to find.

<errors>
  <error404>1010</error404>
</errors>

The page specified in the error404 key will apply to all sites within your Umbraco instance, regardless of the culture settings for each site. When you have multiple sites targeting different culture variants you can specify a unique page to be displayed for each site by setting the value of the associated errorPage key. The attribute culture defines which culture, and therefore which site, the page applies to. The culture value “default” indicates the key for sites that do ...

Get Umbraco User's Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.