Custom Error Documents and Custom 404 Errors in DotNetNuke

Overview

A 404  error is simply a status code that is sent to a users browser whenever a resource that has been requested cannot be found. A resource can be anything form a single page or image on a site, to the entire website.
 
DNN is able to serve a page of your choosing whenever a 404 error is encountered. Alternatively, you can disable custom error pages within DNN and let the webserver itself handle the error. If you wish to set up a custom 404 page or disable custom 404 errors, please see the instructions below:
 

Custom 404 Pages on DNN 5-8

How to Enable and Use DNN Custom Error Pages
 
  1. Log in to your site as a Host level user
  2. Go to Host > Host Settings
  3. On the 'Basic Settings' tab, expand the 'Appearance' section and check the box that says 'Use Custom Error Messages'
  4. Click 'Update' at the bottom of the page
 
Now that we have enabled the custom 404 page functionality within DNN, we must specify a page to serve when a 404 error is encountered. DNN provides a default 404 page, however you may specify your own or even create a new page specifically to act as your custom 404 page. Once a page has been created, you can set the 404 page using the following instructions.
 
  1. Go to Admin > Site Settings
  2. On the 'Advanced Settings' tab, expand 'Page Management'
  3. Set the '404 Error Page' to either a page you wish to use, or to '<None Specified>' if you wish to allow the webserver to handle 404 errors. This effectively disables custom 404 pages within DNN.
  4. Click 'Update' at the bottom of the page to save your changes
  5. Your custom 404 page is now set, however you must also ensure that the page is not disabled via Admin > Page Management
  6. Your custom 404 page should now be working as intended!

Custom 404 Pages in DNN 9

The process for setting up a custom 404 page in DNN 9 is very similar to versions prior, however there is no longer a setting to turn on or off custom error pages - you simply specify one or you do not. Please see the following instructions.
 
  1. Log in as a Host level user
  2. Go to the Settings cog, 'Site Settings' and then the 'Site Behavior' tab as seen below
  3. Set the '404 Error Page' to either a page you wish to use, or to '<None Specified>' if you wish to allow the webserver to handle 404 errors. This effectively disables custom 404 pages within DNN.

Add Feedback