简体   繁体   中英

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!

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.

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM