Setting Up Custom Error Pages with Raven

Custom error pages are a great way to enhance user experience and maintain brand consistency, even when things don't go as planned. This guide will explain how to create custom error pages on Raven, cover the various types of HTTP error codes, and provide tips for improving your error pages.

How to Set Up Custom Error Pages

Raven makes it simple to create custom error pages. To set up a 404 error page, follow these steps:

  1. Open your website in a browser.
  2. Go to (yourdomain.com)/404 to access the 404 error page editor.
  3. Edit the page with your custom message or design, and save the changes.

Once saved, this page will automatically be shown whenever a visitor encounters a 404 error on your site.

Understanding Common HTTP Error Codes

HTTP error codes signal to both the user and the server that something went wrong. Here are the most common ones:

  • 400 Bad Request: The server couldn't understand the request due to malformed syntax. This often occurs when the request parameters are incorrect.

  • 401 Unauthorized: The request requires authentication. Usually returned when the user isn't logged in or doesn't have the right credentials.

  • 403 Forbidden: The server understands the request but refuses to authorize it. This happens when users attempt to access restricted content.

  • 404 Not Found: The server couldn't find the requested resource. This is the most common error users encounter and is often shown for broken or outdated links.

  • 500 Internal Server Error: The server encountered an unexpected condition that prevented it from fulfilling the request. It's a generic error message often caused by misconfigurations or server issues.

  • 502 Bad Gateway: The server, while acting as a gateway or proxy, received an invalid response from an upstream server. Commonly seen with load balancers or proxy servers.

  • 503 Service Unavailable: The server is currently unavailable due to overload or maintenance. Typically a temporary condition.

  • 504 Gateway Timeout: The server, while acting as a gateway or proxy, didn't receive a timely response from an upstream server.

Tips for Creating Effective Error Pages

  • Keep Branding Consistent: Make sure your error pages match your site's overall design to maintain a cohesive brand identity.

  • Use Friendly Language: Avoid technical jargon and explain the error in simple terms. Add a touch of humor if it suits your brand.

  • Provide Navigation Links: Include links to key pages like the homepage or contact page to help users find their way.

  • Add a Search Box: Enable users to search for the content they're looking for directly from the error page.

  • Offer Contact Information: Provide an option for users to report the error or get help if needed.

Example Error Page Content

Here's an example of a 404 error page you could implement:

<html>
  <head>
    <title>404 - Page Not Found</title>
  </head>
  <body>
    <h1>Oops! Page Not Found</h1>
    <p>We're sorry, but the page you're looking for can't be found.</p>
    <p><a href="/">Go to Homepage</a> or <a href="/contact">Contact Us</a> if you need further assistance.</p>
  </body>
</html>

Conclusion

Custom error pages are an opportunity to improve the user experience and guide visitors back to the main content of your site. With Raven's easy-to-use editor, you can create personalized error pages in minutes. For additional help or assistance, contact Raven Support.