404 not served when route doesn't match uploaded asset with Cloudfare pages

I deployed a page but if I go to example.com/sdfsdafsd instead of 404 I get the contexts of my index.html. How can I disable this?
4 Replies
Erisa
Erisa6mo ago
create a 404.html in the output directory
pearbender
pearbenderOP6mo ago
Hey, I just did that and it works, but is it possible to instead just serve cloudfare's 404 page
Erisa
Erisa6mo ago
pages doesnt have a default 404 page if you dont have a 404.html it assumes that youre using a single-page-application and so loads index.html with 200 on 404s its.. strange, but thats how they designed it
pearbender
pearbenderOP6mo ago
OK, thanks!

Did you find this page helpful?