Any way to fail a build if the homepage is 404?

Hello, long time listener first time caller :grinning_face_with_smiling_eyes:

We have been using Netlify to serve our production site schellgames and microsites. We run Craft CMS as our CMS and use a caching tool called Blitz to cache the whole site and ready it for deployment to Netlify’s platform. We sometimes have issues with the Blitz plugin where it fails to cache every page. The “Check Links” plugin for Netlify takes care of this except for one exception - the entry point, the homepage. We’ve had a couple of builds result in a missing homepage for that reason. My question is, is there any way to automatically fail the build if the homepage is missing? Either natively through Netlify, or through some plugin? Has anyone else experienced and had to solve this same issue?

There are probably no plugins already, but you can make use of something like: and then check if it exists. If not, throw an error.


Thanks for your response. I’ll try putting something together like this today!