AstroJS Cloudflare Error is a collection of custom error pages for any website built with AstroJS or not. These static pages use AstroJS and Github pages to make it easy to assign custom error pages in CloudFlare for your site.
It is more or less a fork of mjwebs/cloudflare-error with some modifications and added to the AstroJS structure.
View the resulting error pages here https://ehlovader.github.io/astro-cloudflare-error/
- CloudFlare Pro account or above
- Github or Gitlab
- Fork this repository
- Update repo as needed
- Update the email address in
ContactSupport.astro
or Remove<ContactSupport />
from each error file - Update styles to match your site
- Pages must remain under 1.43 MB including images, fonts, and styles
- Update the email address in
- Push changes to your fork, you will have a URL like
https://<your-username>.github.io/cloudflare-error-pages/
- Open CloudFlare and go to your domain
- Click on the
Custom Pages
tab - Click on the
Customize
button - Enter the URL of the page for that error
- Click
Preview
to test that works andPublish
to make it live - Repeat for each error page
- Finish Gitlab pages
This project is licensed under the MIT License - see the LICENSE file for details