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 fine
13 Replies
Chaika
Chaika5mo ago
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
Chaika
Chaika5mo ago
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.
veeque
veequeOP5mo ago
yup that works, thank you! how do i mark this thread as solved?
Chaika
Chaika5mo ago
You can edit the tags, I already did it though
No description
veeque
veequeOP5mo ago
oh ok, thanks!
veeque
veequeOP5mo ago
ok so apparently now when i go there and i pass the login, i get a 404?
No description
veeque
veequeOP5mo ago
No description
veeque
veequeOP5mo ago
(ignore the passkeys.js, it's keepassxc)
Chaika
Chaika5mo ago
you have an access policy on it?
veeque
veequeOP5mo ago
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
veeque
veequeOP5mo ago
is this what you mean?
No description
Chaika
Chaika5mo ago
yea, you'd need to add your dev custom domain as another part of that policy or remove it
veeque
veequeOP5mo ago
oh i see, trying it now ok, everything works! thanks!
Want results from more Discord servers?
Add your server