Custom domains for for Cloudflare Pages preview build

I wasn’t able to find a feature to add custom domain for deployment branch so I would be able to use short custom domain instead of pages.dev.

example.com - production domain, uses main branch
development.example.pages.dev - preview domain, uses development branch

I want to be able to access it as dev.example.com, I though I can have a workaround and make a CNAME for dev.example.com and point it to development.example.pages.dev, hovewer it shows production branch deployment too.

Anyone can suggest a solution?

It’s not possible at the moment, there are no custom urls per branch.

I know at least a user did a custom Worker to implement that feature, but I am not sure if the code is public. I’ll ask and eventually report back.

1 Like

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