Issue setting up custom subdomain to proxy branch of Pages

I have setup domain registered with cf (cloudflare) and setup a base pages (in this case napp). The base routing from napp.pro to napp.pages.dev works flawlessly, but when I am trying to route markdown.napp.pro to markdown.napp.pages.dev then it doesn't work. I am deploying via wrangler and all my deployment to the branch (in this case markdown) within the main pages site (napp.pages.dev) are shown as preview. I dont know if that has any issue, but the main site markdown.napp.pages.dev works flawlessly. I went through the channel for similar issue and read through a couple of posts, but none of those help me understand this better. Any pointer in this regard will be of great help.
No description
4 Replies
Chaika
Chaika12mo ago
You need to add every hostname as a new custom domain in your pages project settings
Chaika
Chaika12mo ago
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.
Chaika
Chaika12mo ago
ex, add color.napp.pro, it should autoadd the cname for you, and then change the cname also kind of using pages backwards to have different projects on different branches like that, they should be their own projects, but it's probably fine for really small stuff, just not geared towards it
n
nOP12mo ago
awesome! I added all of the branches and then updated CNAME entries as per the documentation link and it worked like magic. Thanks a ton @Chaika
Want results from more Discord servers?
Add your server