Try our conversational search powered by Generative AI!

404 Error page setup


How to setup 404-error page in episerver cms

Apr 15, 2021 13:24


You can use this module

Apr 15, 2021 13:43

There's no need to install the Geta handler if you just want 404 pages and not CMS controlled redirects.

Turn custom errors off

  <customErrors mode="Off" />

Configure HTTP Errors pointing at a CMS path

  <httpErrors errorMode="Custom" existingResponse="Replace">
      <remove statusCode="404" />
      <error statusCode="404" responseMode="ExecuteURL" path="/NotFound" />

Setup a controller for the error page that returns a 404 response in the controller action

Response.StatusCode = 404;
Edited, Apr 15, 2021 16:33
Scott Reed - Apr 15, 2021 16:35
You can of course use a static page but I prefer to put 404 pages in the CMS and static pages for 500 errors
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.