Subdomains different netlify deploys

Good Day.
I can’t find step-by-step instructions to accomplish the following. I have searched and found some edge cases, or some others that don’t spell out the steps from 1 onward.

foo.example.com → blah-otter-2203.netlify.app
bar.example.com → smrt-kdd-9485.netlify.app
example.com → fun-boat-4957.netlify.app
www.example.com → fun-boat-4957.netlify.app

I pushed the DNS to dns[1-4].p08.nsone.net from my register. My guess is that my register should be the DNS and just push CNAMEs to Netlify. I’d rather let Netlify be the DNS provider.
Thanks.

Hi, thanks for reaching out and welcome back! Just so I understand are you asking how to migrate your DNS including subdomains to Netlify or just point them at Netlify?

I’m attaching some documentation that may be of some help.

I’d prefer to use Netlify DNS but I’m not sure how to accomplish the subdomains to be pointed to different production deploys.
If that’s not possible, then I can just use Namecheap’s DNS and point CNAMEs to each deploy.
Hope that’s making sense.

Ok, reading further, it looks like the subdomains will have to be a CNAME from namecheap’s DNS to specific netlify deploys.

I’m confused about what to do for the apex domain if I’m using CNAMEs for the subdomains. Namecheap does allow ALIAS.

If you want to use Netlify DNS and point subdomains to different production deploys, you have a couple of options. Netlify DNS supports records like A, AAAA, CNAME, and TXT.

To point subdomains to different production deploys using Netlify DNS, you can create individual A or AAAA records for each subdomain and set their respective IP addresses. For example:

subdomain1.example.com.    A    192.0.2.1
subdomain2.example.com.    A    192.0.2.2

If you prefer to use Namecheap’s DNS and point CNAMEs to each deploy, you can do so as well. In this case, you would create CNAME records for each subdomain and set them to the Netlify subdomain URLs. For example:

subdomain1.example.com.    CNAME    subdomain1.netlify.app
subdomain2.example.com.    CNAME    subdomain2.netlify.app

You can use Netlify’s deploys for your subdomains while still using Namecheap for your DNS management.

Regarding the apex domain (e.g., example.com) when using CNAMEs for the subdomains, Namecheap does not allow CNAME records at the apex domain. According to Namecheap’s documentation, they offer ALIAS that can be used as an alternative. From my understanding ALIAS acts similarly to a CNAME but is allowed at the apex domain.

You can create an ALIAS record for your apex domain and set it to the Netlify subdomain URL for your main deploy. This way, requests to the apex domain will be properly directed to your Netlify deploy.

Thanks.
Last Q:

Assuming I use Netlify’s DNS, which is better (more robust, efficient, less latency): configuring subdomains as CNAMEs or A Records (while all on the same infrastructure, Netlify’s).

Are those the correct IP addresses that you used in your example (192.0.2.x)?

Hi, no those are just sample IP Addresses. Netlify’s load balancer, IP is 75.2.60.5