2.13.6.6. Customizing the 404 page in MODX

Warning!

A custom 404 page won't work correctly for URL in which there is a mention pagespeedif included optimization settings... To fix the problem, disable optimization settings or not use links with similar keywords.

In MODX, the 404 error page is generated directly in the CMS, which is why the setup instructions your 404 page will not give the desired result.

  1. Create a new resource and provide data:
    1. Clickon "New resource".
    2. "heading" — specify the title of the page.
    3. Check the items "Hide from menu" and "Published".
    4. "Content" — specify the text that should be displayed on the 404 page, for example
      Sorry, the page you requested was not found. Probably, you specified a non-existent address, the page was deleted, moved or is now temporarily unavailable!
    5. Remember ID created page (ID is indicated in brackets).
    6. Save the page.
  2. Go to section "Settings → System settings":
  3. Customize the page to display as a 404 error:
    1. In point "Key search" indicate error_page or find this parameter in the settings.
    2. Double-click on the value opposite the found parameter and specify ID page that was created (settings are saved automatically).
    3. Check if the 404 page is displayed correctly.
Content