How to implenent NameCheap DNS with Netlify and Heroku

527 Views Asked by At

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!

2

There are 2 best solutions below

0
crodev On BEST ANSWER

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.

0
Taku On

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)