Drupal is a registered trademark of Dries Buytaert

fast_error_pages

1 sites Security covered
View on drupal.org

Introduction

The Fast Error Pages module improves performance by serving cached error pages such as 404 Not Found and 403 Access Denied before Drupal fully bootstraps.

In a normal Drupal setup, each 404 or 403 request triggers a full bootstrap to determine the route and render the error page — which can be expensive on high-traffic sites or those hit by many invalid URLs.

Drupal core’s Fast 404 can return static HTML for predefined paths but cannot render dynamic or themed error pages.
Fast Error Pages solves this by caching and serving your actual themed error pages while still respecting Drupal’s cache tags and invalidation system.

Features

  • Early execution – Runs very early in the Drupal bootstrap process.
  • Dynamic cached pages – Caches and serves the actual 404 and 403 pages configured in site settings.
  • Plugin-based architecture – Uses plugins for error handling. Out of the box, 404 and 403 handlers are provided, but you can easily add support for other status codes (e.g. 410, 500).
  • Cache-aware rendering – Sets the correct cache tags and contexts, so cached error pages are automatically invalidated when related content or configuration changes.
  • Compatible with Drupal caching and reverse proxies – Works seamlessly with Drupal’s internal page cache, Dynamic Page Cache, and external solutions such as Varnish, Nginx, or Cloudflare.
  • Requires caching – This module assumes a full-page caching layer or reverse proxy is in use. Without caching, there is no performance improvement.

Post-Installation

Once installed and enabled, Fast Error Pages automatically takes over handling of 404 and 403 errors.
No additional configuration is required, though you can review which error pages are set in:

  • Configuration → System → Basic site settings (where the 404 and 403 pages are defined)

How it works:

  1. When a request results in a 404 or 403 error, the module intercepts it early in the bootstrap process.
  2. It checks whether a cached version of the corresponding error page is available.
  3. If cached, it serves that version immediately with the correct HTTP headers.
  4. If not cached, it does not perform a full Drupal bootstrap. Instead, it performs an internal HTTP request to the configured error page path (for example, the node or route set as your 404 page).
  5. The resulting rendered output is cached and served directly on subsequent requests.

This ensures your visitors always see the correct themed error page while minimizing load and response time.

Additional Requirements

  • Drupal 10 or 11
  • A caching solution (Drupal’s internal page cache, Dynamic Page Cache, or an external reverse proxy such as Varnish or Cloudflare)

Supporting this Module

If you find this module useful, consider contributing back by:

  • Reporting issues or feature requests in the issue queue
  • Submitting patches or merge requests
  • Providing documentation or performance feedback

Activity

Total releases
3
First release
Oct 2025
Latest release
3 months ago
Release cadence
7 days
Stability
100% stable

Release Timeline

Releases

Version Type Release date
1.0.2 Stable Nov 12, 2025
1.0.1 Stable Nov 12, 2025
1.0.0 Stable Oct 30, 2025