404 redirect for subdomains

I would like to configure the following feature: in case of a subdomain that does not exist, cloudflare redirects the user to the main page. I have configured a redirect rule to exclude all existing domains. So:

Redirect to page: astoria.studio if:
  • Address is not api subdomain
  • Address is not download subdomain
    ... etc.
Unfortunately, this doesn't work. If you type e.g.
  • kjwevhfouqwb.astoria.studio,
  • blablabla.astoria.studio,
the user is NOT redirected to the home page.

How to configure this feature?
image.png
Was this page helpful?