Here’s the deal: getdbt.com is the apex domain, and Netlify is not the DNS provider for it. However, Netlify does own the deployment of docs-getdbt-com.netlify.com, which is mapped to docs.getdbt.com via a custom domain.
We’re successfully deploying next--docs-getdbt-com.netlify.com as a branch deployment from the same Netlify site. I was hoping that we could CNAME this site as docs-next.getdbt.com, following the instructions in the support guide I linked above. Running nslookup gives an encouraging result that the CNAME mapping succeeded. When I go to visit docs-next.getdbt.com, however, it returns a 404 error (Not Found) and a missing certificate (hopefully related):
Is our better bet here to deploy the docs-next site not as a branch deployment off the existing docs-getdbt-com site, but instead by creating a new Netlify site (e.g. docs-next-getdbt-com.netlify.app) that treats the next branch as its primary deployment branch? I’m guessing that may allows us to use standard custom domains, as opposed to branch subdomains. I’m open to options!
Hiya @jerco and sorry to be slow to get back to you! Sadly, what you are trying won’t quite work. You have a couple of options to get close:
You won’t be able to use a CNAME with that hostname to create your own branch subdomain (which is the name of the feature you’re trying to use - show the “next” branch rather than your production deploy). You need to browse with the actual branch subdomain name - so either next--docs-getdbt-com.netlify.com or next.docs.getdbt.com are the patterns that will work for a branch called next on a site with a different primary custom domain (shown here: Netlify App). If you’d like to use this and are ok with that naming, let me know as I do need to add that to the certificate manually, after you set up the CNAME to match the above pattern
If that name is a hard requirement, fear not, you can still use it for that purpose! Just have to configure it differently. You can set up a second site, connected to the same repo, using next as the PRODUCTION branch, and then apply any name you like to it - such as docs-next.getdbt.com . It is perfectly acceptable to us, to link two sites to the same repo to show different production branches, and you can choose NOT to have the main site build the next branch (here: Netlify App) so you aren’t paying for a repeated build on that second site.
Got it, thanks for the detailed explanation @fool! I’m going to go with the first option, next.docs.getdbt.com, and I’ll change the aforementioned CNAME to be:
next.docs 3600 IN CNAME next--docs-getdbt-com.netlify.app.
Does that sound right? I just want to triple-check before changing DNS records. As soon as you confirm, I’ll take care of the CNAME, and then I’ll request the manual certificate addition when that’s done.
Yup - looks good to me as long as your DNS host/service appends “.getdbt.com” to that, which I expect they do since this looks like it isn’t your first rodeo