Welcome to the OpenCities help centre. Search for what you're after, or browse the categories.
Can't find what you're looking for? Submit a support ticket and we'll be in touch.

Follow

Create custom error pages

avatar of Kira Hartley

Kira Hartley

Last updated

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.

  1. 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.
  2. Select OC General as the content type.
  3. Fill in the page fields, then add your error message to the WYSIWYG Editor.
  4. 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.
  5. Publish your page.
  6. From the main menu, go to More > Site Management > your site > Site Settings.
    Site settings icon in site management
  7. 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. 
  8. Select Save Settings and Save.

We recommend testing out your error page by purposely entering a faulty URL in your browser.

What else?

Was this article helpful?
0 out of 0 found this helpful