How can I add a DNS record (dev.*) that points to a preview deployment?
I have a preview deployment with this URL:
dev.[site-name].pages.dev
, so I tried adding a CNAME record dev
that points to dev.[site-name].pages.dev
but navigating to it gives a 522, why's that? the pages.dev url works just fine13 Replies
need to add it as a pages custom domain under the Pages Project -> Custom Domains tab, then you can change the target to use the dev branch
Cloudflare Docs
Add a custom domain to a branch | Cloudflare Pages docs
In this guide, you will learn how to add a custom domain (staging.example.com) that will point to a specific branch (staging) on your Pages project.
yup that works, thank you!
how do i mark this thread as solved?
You can edit the tags, I already did it though
oh ok, thanks!
ok so apparently now when i go there and i pass the login, i get a 404?
(ignore the passkeys.js, it's keepassxc)
you have an access policy on it?
if by that you mean the thing where i set which emails are allowed in, yes. otherwise i don't know what you're refering to
is this what you mean?
yea, you'd need to add your dev custom domain as another part of that policy or remove it
oh i see, trying it now
ok, everything works!
thanks!