'How to implenent NameCheap DNS with Netlify and Heroku

So I want to host my front-end React app on Netlify and I want it to be at www.mydomainname.com.
I also want to host my back-end on Heroku and I want it to be at api.mydomainname.com.

The problem is that if I set NameCheap DNS settings to use NamCheapDNS I can point it to Heroku, but I can't find a way to point it to Netlify as well since Netlify tells me to set NameCheap DNS to Custom DNS and I should point it to Netlify DNS with dns1.p07.nsone.net from 1 to 4.

Is there a way to have front-end on Netlify and back-end on Heroku, or at the end I have to transfer my React front-end to Heroku as well? And would that use the extra dyno or not?

Thanks!



Solution 1:[1]

In the end, I added dns1.p04.nsone.net. as the NS Record for "www" host in the Advanced DNS tab under my domain name.

Solution 2:[2]

Belatedly,

You can add a CNAME in Netlify's DNS records that points to Heroku's DNS. It looks like this

Record Type=CNAME
Name=api
Value=asdfasfd.herokudns.com
TTL=(blank)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 crodev
Solution 2 Taku