Blogs

Properly Using DNN's Custom 404 Page

24 Sep

Recent issues with a few clients I have encountered some "unusual" behaviors.  Either a situation where we had an unusual redirect situation, or we had pages that were showing HTTP 200 (success) status responses when in all reality the page truly didn't exist.  In the end, we had an IIS customization configured to handle certain types of 404's that DNN wouldn't handle, such as those for missing images, javascript files, and more.  Nothing that we haven't done for quite a while.

However, in this situation the DNN "Site Setting" option for a custom error page was used to make a very friendly looking "Not Found" page and the IIS Redirect was sending people there.  This was the root cause of the unusual behavior, as if you visit that page directly, such as if you wanted to edit it, you get an HTTP 200 status.

To get the page to properly work as a 404, not found, page you need to add ?status=404 to the URL.  The root cause fix was to change the redirect from /404-Error-Page to /404-Error-Page?status=404.

Hope this helps someone that might be experiencing some unusual redirects or 404 behaviors. 

tags: DNN, DNN Administration, Quick Tips
comments powered by Disqus

Content provided in this blog is provided "AS-IS" and the information should be used at your own discretion.  The thoughts and opinions expressed are the personal thoughts of Mitchel Sellers and do not reflect the opinions of his employer.

Connect with Mitchel

I hope the information here has been helpful. To stay connected you can also subscribe to blog updates via email, contact Mitchel about consulting services, or reach out for assistance via CodeMendor

Content Copyright

Content in this blog is copyright protected.  Re-publishing on other websites is allowed as long as proper credit and backlink to the article is provided.  Any other re-publishing or distribution of this content is prohibited without written permission from Mitchel Sellers.