How to change the HTTP status code?

My site is currently returning a 404 Page Not Found status code for pages that do not exist.

But I am trying to test a website scanner against that website which will report an error when it returns something other than 404.

So how do I change the 404 status code for unknown pages?

I need to to return a different status so that I know the website scanner works.

Depending on your origin server, you could make a rule to return a different error code, but you can’t change the status code from Cloudflare.