When site visitors attempt to visit a page or files on your site using an outdated URL, a broken link, or encounter a general error, they will be redirected to a generic error page. We recommend creating custom error pages for 404 errors (Page Not Found) and other general errors. Some useful information to include is:
- A personalized error message
- A link back to your homepage
- A list of popular pages your users may be trying to visit
- Images relevant to your city or council
There are two error pages you may want to create: one to handle 404 errors (Page Not Found), and another for unhandled exceptions, which are general errors but not maintenance errors.
The Page not found error page will display when visitors try to access an invalid URL, including content pages and document files such as PDFs, Word documents, and Excel files.
After you've created these pages, you'll need to enter them into your Site Settings. Check out this video to learn how:
Create and assign an error page
The best content type for error pages is an OC General page.
- Where you nest this page is up to you but, if you want to create it on the top level of your site, right-click on the site name at the top of your site tree and select Create Page. You may want to create a System Pages folder for pages such as this, to help keep your site tree organized.
- Select OC General as the content type.
- Fill in the page fields, then add your error message to the WYSIWYG Editor.
- Go to the Settings tab and check all the Hide from search and navigation settings. This page shouldn't appear anywhere except when a user encounters an error.
- Publish your page.
- From the main menu, go to More > Site Management > your site > Site Settings.
- Scroll down to the "Page not found" page url and Error page url fields and use the predictive text bar to assign the error page you've just created. If you want, you can use the same error page for both fields.
- Select Save Settings and Save.
We recommend testing out your error page by purposely entering a faulty URL in your browser.