Redirect 404 responses to a static subpage on New Google Sites

Hey Cloudflare community!

I’m using New Google Sites to host my website and Cloudflare as my domain name server and domain registrar.

I’m curious if it’s possible to use Cloudflare to redirect every 404 response (but not other responses) to a static subpage that I have created?

How would I go about to get this done? Is it possible with Cloudflare and New Google Sites?

Thank you!

Best regards,
Joacim

It’s not possible using Cloudflare Rules, such as Page Rules or Redirect Rules, as they would need to be based on the response, at which point in time they have already been triggered.

If you are (or have access to) a JavaScript developer, you may want to consider Workers to perform that function. If you are so inclined, please open a new topic under Developers > Workers to ask for help.

1 Like

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