Custom Error Page not working - Cloudflare Pages


I have 3 custom error pages (404.shtml, 500.shtml and 503.shtml) on my Github repository connected to Cloudflare Pages.

When I try to visit a page that does not exist, the custom 404 page does not work; it displays the content of my index.html file instead.

From Cloudflare Pages documentation I understand that for the custom 404 page to work I need to change the extension to 404.html instead of 404.shtml, is that the correct understanding?

Additionally, will modifying the 503.shtml and 500.shtml to .html extension ones make them work?
Or does Cloudflare not allow custom error pages for 500 and 503 error?

Additional details:
Cloudflare plan - Free
Domain -
Web page to test custom 404 page not working (This page does not exist) -

If you have a 404.html page in your Pages project we will show that yes.

We do not support 500 or 503. 503 should never show and 500 is either inside your handling so we couldn’t or it’s an issue our side and we couldn’t.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.