I use my custom domain name for the backend. In Google domains I had created an A record:
Note: using “xxx” to overcome 6 links max requirement.
Host Name: strapi.hoofs-and-horns.com
Type: A
Data: 54.80.27.167
On my EC2 instance I used NGINX to configure it and to use letsencrypt certificates. This works great and I can issue API requests such as:
https://strapi.hoofs-and-horns.com/api/products
My frontend obviously needs access to the backend APIs. I added following environment variable:
GATSBY_STRAPI_API_URL ==> https://strapi.hoofs-and-horns.com/api
To access Netlify frontend I had created a CNAME record in Google domains:
Host Name: www.hoofs-and-horns.com
Type: CNAME
Data: bejewelled-naiad-656cfc.netlify.app
Where “bejewelled-naiad-656cfc.netlify.app” is the site name of the Netlify frontend.
In Netlify Domain Management I see a warning - “Awaiting External DNS”.
When I click on it it displays following information:
Log in to the account you have with your domain provider,
and make sure the name servers for hoofs-and-horns.com are
set to the following hostnames:
dns1.p01.nson.xxx
dns2.p01.nsone.xxx
dns3.p01.nsone.xxx
dns4.p01.nsone.xxx
In Google DNS settings, Name servers are set to:
ns-cloud-d1.googledomains.xxx
ns-cloud-d2.googledomains.xxx
ns-cloud-d3.googledomains.xxx
ns-cloud-d4.googledomains.xxx
I can switch to “Custom name servers” to specify Netlify domains but then my access to the backend will be lost since either “Default name servers” or “Custom name servers” may be enabled, but not both.
In seems logical to me for two record types to be able to use different doomain name servers but this is not how it is set up with Google Domains.
I tried adding “Google DNS settings” name servers to “Custom name servers”
dns1.p01.nsone.xxx
dns2.p01.nsone.xxx
dns3.p01.nsone.xxx
dns4.p01.nsone.xxx
ns-cloud-d1.googledomains.xxx
ns-cloud-d2.googledomains.xxx
ns-cloud-d3.googledomains.xxx
ns-cloud-d4.googledomains.xxx
But that has not worked either.