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