DNS configuration with external domain

Hi everybody !

I am not the first one, but looked for hours, tested, and did not find the solution.

My netlify website is graphandco-next.netlify.app
My own domain is graphandco.com, hosted on 1&1/Ionos provider. I have a wordpress multisite on subdomain sites.graphandco.com, and other domains pointing to these sites. Everything works fine.

My goal is simply to point my main domain graphandco.com to my netlify site. I tried to change the server names in the my domain configuration, but it breaks all my wordpress sites. I tried to add a CNAMe record with www for the host and graphandco-next.netlify.app for the value. Not working either.

Did something change on netlify configuration ? I might be wrong but I remember putting an IP adress on a A or AAAA record, but I don’t see the IP adress of my netlify site, and found some answers saying that it has multiples adresses…

As you can see I am a litte bit lost, and not comfortable with these bloody DNS !!
Thanks in advance.

Hey @Graphandco

Currently, I see the www subdomain is pointing to graphandco-next.netlify.app which is correct. The apex graphandco.com is currently pointing to 217.160.0.113 instead of Netlify’s load balancer IP or hostname as outlined in this documentation.

The current configuration is leading to an infinite loop as the subdomain redirects to the apex and vice versa

HTTP/1.1 301 Moved Permanently
Age: 19
Cache-Control: public, max-age=0, must-revalidate
Content-Length: 42
Content-Type: text/plain
Date: Sun, 17 Apr 2022 12:03:13 GMT
Location: https://www.graphandco.com/   # Requests apex
Server: Netlify
X-Nf-Request-Id: 01G0VPG7CHFYHZSC6B615KXJNX

HTTP/2 301
age: 20
cache-control: public, max-age=0, must-revalidate
content-type: text/plain
date: Sun, 17 Apr 2022 12:03:11 GMT
location: https://graphandco.com/      # Requests www subdomain
server: Netlify
strict-transport-security: max-age=31536000
x-nf-request-id: 01G0VPG7EXQXEAVDZAEHANW800
content-length: 38

In terms of configuring Netlify DNS I suggest first reading [Support Guide] Should I use Netlify to manage my DNS? to determine if this is the best option for you, followed by [Support Guide] How do I migrate a domain to Netlify DNS with zero downtime? which shows how to ensure WordPress doesn’t break (hopefully.)

Many other DNS resources are listed in [Support Guide] Compiled resources for custom domains on Netlify and DNS settings -- start here! too.

If you have any further questions or issues, don’t hesitate to reply.

Thanks for feeding back ! I actually see the loop you are talking about. I think changing server names is not the best option, as I have to manage several others domains linked to my wordpress installation.
I might also have irrelevant entries, as I tried different options and already configured this domain before. I thought that the CNAME would be enough, I have a subdomain pointing to another netlify site, the only entry is a CNAME configured like my apex, but obviously instead of www I put my sudomain alias. Makes me think I have conflictual entries…

You will need to change the A record for the apex @ if you want to use it on Netilfy (and not just the www) as per the documentation linked above as well as remove the AAAA record

Okay. I removed the AAA record. The piece I was missing is “what to put in this A record ?” I searched other topics, found 104.198.14.52 and tried with no big hope. And it worked !! Note sure if the configuration is very clean but everything looks fine.
Thank you for your precious help :slightly_smiling_face:

Hi @Graphandco,

You’ll want to use 75.2.60.5 instead of 104.198.14.52 (this IP is deprecated). Since you’re using External DNS, you’ll follow option 1 of this Support Guide.

Additionally, I see you have a inactive DNS Zone configured:

dig graphandco.com NS +trace | tail -n 6                                                                                  
graphandco.com.		86400	IN	NS	ns1092.ui-dns.com.
graphandco.com.		86400	IN	NS	ns1101.ui-dns.org.
graphandco.com.		86400	IN	NS	ns1037.ui-dns.biz.
graphandco.com.		86400	IN	NS	ns1024.ui-dns.de.
;; Received 163 bytes from 217.160.81.37#53(ns1037.ui-dns.biz) in 40 ms

The last line, ;; Received 163 bytes from 217.160.81.37#53(ns1037.ui-dns.biz) in 40 ms, shows the name server that answered this query last. Since it’s not a Netlify name server the DNS Zone is inactive.

We have a Support Guide on inactive DNS Zones on inactive DNS Zones. This section of the Support Guide addresses how exactly to fix the inactive DNS zone.

To summarize, you’ll want to use 75.2.60.5 for the A Record for graphandco.com. For www.graphandco.com you’ll continue to use graphandco-next.netlify.app as @coelmay mentioned and you’ll want to fix the inactive DNS Zone.

1 Like

Thank your for pointing me the right IP. I also removed the inactive zone. It comes probably from a precedent config. DNS scares me and I try to touch it the less I can !

Hi, @Graphandco. I also see it working now. By the way, I see you have the apex domain (graphandco.com) set as the primary custom domain here:

https://app.netlify.com/sites/graphandco-next/settings/domain#custom-domains

When you are using the external DNS instructions, we strongly recommend making the www subdomain (www.graphandco.com) or some other subdomain primary. The only time we recommend ever making the apex domain primary is if Netlify DNS is being used (or a supported variation CNAME flattening is being used for the apex). Again, as you are using the IP address 75.2.60.5 for the apex, we recommend making www.graphandco.com the primary custom domain for this site.

Hello luke, thanks for your advice, I made the www subdomain primary. And thanks everyone for your help, very nice community and great support.

1 Like

@luke, I was wondering: why do you strongly recommend making the www subdomain the primary instead of the apex with external DNSs?

Hi @loganpowell. The A record for the apex domain doesn’t use geographical routing. That IP address routes to a system physically in California in the USA. If you use the A record for the apex domain and then make that the primary domain for the site, it will route all traffic for your site to that one IP address.

In contrast, if you use the CNAME record pointing to the site subdomain under netlify.app geographical IP routing will be used. This means when the DNS request is made for the CNAME, it will return different IP addresses based where someone is in the world. This will route them to the closest CDN node and the site’s performance will be improved when this is done.

1 Like