Pages redirect or remove domain to custom domain

I have deployed a Cloudflare Pages nuxt site and added a custom domain. The custom domain I have protected with Cloudflare Access.

Cloudflare Access does not stop people accessing the default * domain

Is it possible to redirect the * domain to the custom domain or remove it ?

I have found a way to restrict access to {yourappp} subdomain.

By using you can add two applications (Access → Applications):

  • {yourappp} (production)
  • *.{yourappp} (for preview deployments)

By leaving “subdomain” field empty, you can target production app. Then it’s only the matter of defining rules, who can access and how they authenticate.

1 Like

How are you getting to show up in the Access domain? All I see are my zones.

Try manually pasting your CF pages address. It worked for me and I think I saw and autocomple after pasting.

1 Like

Ah, you can paste in a hostname! Cool! Though it doesn’t seem to verify if I paste in a subdomain I don’t have.

Yeah, it seems odd. But I hope they verify that you own pages which you add and set rules to :slight_smile:

1 Like