Connecting Netlify app to my Pair Networks domain name

Hi all –

My first post here, and in the spirit of asking a good question to get a good answer, including details of what I’ve tried and how it doesn’t meet my expectations, I seem to have written quite a long post. Thanks in advance for your patience.

I’ve been using R for 20+ years, I have a current need to develop a website, and the RStudio - Hugo - GitHub - Netlify toolchain is appealing to me.

I already own several domain names registered via Pair Domains and hosted by Pair Networks. I have no desire to transfer the domain to another host.

After some (other) trials & tribulations, I have successfully deployed my build to a Netlify app, magnificent-sable-0aad45.netlify.app Now I am at the final stage, connecting the Netlify app to my domain name.

In Netlify, I see that I need to go to Domain Settings for my app, and add my primary domain. I attempt to add “www.psychdevsolutions.com”. Netlify adds that subdomain as well as the primary domain “psychdevsolutions.com”. But on the bare domain, Netlify warns me to “Check DNS configuration”; the link from that warning message suggests I need to add DNS records to my domain at my domain host - they recommend ALIAS, ANAME, or CNAME records. My domain host offers CNAME records, so I try that.

At my domain host, domain management is done through a user interface. I have no access to a command line for domain management actions. I add a CNAME record which requires me to identify a subdomain - “www” will work. I point that subdomain to apex-loadbalancer.netlify.com … but Netlify is still not happy. So I call my domain host support, they talk me through adding an .htaccess file that should redirect any “psychdevsolutions.com” to “www.psychdevsolutions.com”.

Netlify still shows the “Check DNS configuration” warning. Okay, so there is a fallback position - pointing an “A” record to the IPv4 address of the main Netlify load balancer.

Back at my domain host, I delete the CNAME record and added the recommended (fallback) A record. Again, however, I’m required to identify a subdomain, so Netlify still gives me the same “Check DNS configuration” warning.

Because I have the Check DNS configuration warning, Netlify also is “Waiting on DNS propagation” and “We can’t provision a [SSL/TLS] certificate until your DNS configuration is pointing at the Netlify servers and the changes have propagated.”

It occurs to me that a possible solution would be to tell Netlify to add only www.psychdevsolutions.com as the Custom Domain… unfortunately, when I remove custom domains and attempt to add just the subdomain, Netlify automatically adds the bare domain.

It seems I’m stuck in a vicious cycle.

  1. I can’t tell Netlify to use only a subdomain, so I have to use the bare domain, but

  2. I can’t tell my domain host to add a DNS record (A or CNAME) that affects only the subdomain, and

  3. The .htaccess to redirect calls from the bare domain to the subdomain doesn’t appear to satisfy Netlify when it’s checking the DNS configuration

I am well aware that I know just enough about all this to be dangerous. I’m likely to ask clarifying questions, not because I’m not reading your instructions, but because the instructions may not be as clear and simple as you think. I appreciate any and all advice to solve my problem.

Thanks!

–David

In the further spirit of asking good questions - specifically, in continuing to work on the problem, I finally found a relevant Netlify support post: [Support Guide] Can I host my site on Netlify but keep my DNS at my domain registrar?

The key for me was that

a) I needed to create both an A record and a CNAME record in my Custom DNS settings at my domain host (Pair Networks)

b) The A record needed to specify @ as the subdomain name, and point to the IPv4 address of the Netlify load balancer (currently as of Feb 2023, that is 75.2.60.5). Using @ as the subdomain was the key point I had been missing

c) The CNAME record needed to specify www as the subdomain name, and point to apex-loadbalancer.netlify.com

Then, after waiting a bit and refreshing the Domain Settings page for my Netlify app, the Check DNS configuration warning has disappeared from the apex domain name.

I don’t yet have the SSL/TLS certificate, but now I believe that is a matter of waiting for DNS propagation, rather than a failure of the DNS configuration in the first place.

And both psychdevsolutions.com and www.psychdevsolutions.com point to the website deployed in my Netlify app. Yay!

And my domain remains hosted at Pair Networks, which I wanted all along (I’ve been a customer for literally 25 years).

Anyone, please feel free to comment/suggest ways to improve the process, etc.

–David

Hi, @DD98155, there are two changes I would recommend:

1. Change this DNS record below:

www.psychdevsolutions.com. 3600	IN	CNAME	apex-loadbalancer.netlify.com.

to this instead:

www.psychdevsolutions.com. 3600	IN	CNAME	magnificent-sable-0aad45.netlify.app.

The second version is more inline with the instructions here:

https://docs.netlify.com/domains-https/custom-domains/configure-external-dns/#configure-a-subdomain

2. Change the primary custom domain from psychdevsolutions.com to www.psychdevsolutions.com here: https://app.netlify.com/sites/magnificent-sable-0aad45/settings/domain#custom-domains

The second change will cause psychdevsolutions.com to redirect to www.psychdevsolutions.com. As that is using the CNAME under netlify.app that domain will utilize our full CDN. The apex domain is pointing to just one IP address (75.2.60.5) and that IP address does not route to the global CDN. The CNAME under netlify.app will route to the global CDN.

If there are questions about how to make those two changes or why they are important, please let us know.

Thanks, Luke, for the recommendations.

Re 1) Now I have pointed the CNAME to my subdomain at netlify.app. You did not suggest removing the A record at my domain host, so I have not. Here are my current domain records:

Please comment if I should delete the A record here.

Re 2) Now I have changed the primary custom domain to be the www subdomain in my Netlify Domain Settings. I see the effect of the redirect when I type psychdevsolutions.com into my browser address bar. I thought I had tried something like this in my earlier flailing about, but perhaps not this exact combination. Current domain settings at Netlify:

Again, please comment if anything here should be different.

Thanks much for your recommendations.

–David

The settings appear to be correct. Is something still not working as expected for you?

@hrishikesh Everything seems to be working fine for me. Everything was also working fine (to all appearances) before the changes suggested by @luke so I thought it prudent to report back with more detail in case something else could be improved - in particular the Custom DNS “A” record, which Luke had not mentioned.

Thanks again for the help you’ve given.

–David

Hi, @DD98155. I’ll be happy to explain the reason for the suggested changed. The reason I recommended the changes can be seen here:

https://dnschecker.org/#A/psychdevsolutions.com

and here:

https://dnschecker.org/#A/www.psychdevsolutions.com

(Note, I believe the “Search” button must be clicked to see the results for the URLs above.)

What they show is this:

  • for the apex domain locations route to a single IP address
  • for the www subdomain, different IP addresses are returned for different locations

If you had left the apex as primary, all site traffic would route to San Francisco. If someone was in Germany, they would connect to an IP address in San Francisco. If someone was in Australia, the would connect to an IP address in San Francisco.

With the new settings, a site visitor in Germany is routed to an IP address in (wait for it) Germany! A site visitor in Australia now is routed to an IP address in Australia.

With the A record and the apex as primary, your site didn’t use the full CDN. With the CNAME record and www as primary, the site is now using our full CDN.

About the A record for the apex, yes, leaving that in place is correct. The apex is still routed to Netlify but we 301 redirect that to the www subdomain and then the full CDN is used from that point on.

Here is an example with curl:

$ curl --compressed -svo /dev/null https://psychdevsolutions.com/  2>&1 | egrep '^(<|>)'
> GET / HTTP/2
> Host: psychdevsolutions.com
> user-agent: curl/7.79.1
> accept: */*
> accept-encoding: deflate, gzip
>
< HTTP/2 301
< location: https://www.psychdevsolutions.com/
< server: Netlify
< strict-transport-security: max-age=31536000
< x-nf-request-id: 01GS7HNXTP27XPYWDBZGEQ4MRV
< content-type: text/plain; charset=utf-8
< content-length: 49
< date: Tue, 14 Feb 2023 08:46:52 GMT
<

and:

$ curl --compressed -svo /dev/null https://www.psychdevsolutions.com/  2>&1 | egrep '^(<|>)'
> GET / HTTP/2
> Host: www.psychdevsolutions.com
> user-agent: curl/7.79.1
> accept: */*
> accept-encoding: deflate, gzip
>
< HTTP/2 200
< age: 0
< cache-control: public, max-age=0, must-revalidate
< content-encoding: gzip
< content-type: text/html; charset=UTF-8
< date: Tue, 14 Feb 2023 08:46:57 GMT
< etag: "0642bf73562e10d3c96734ffa11e5070-ssl-df"
< server: Netlify
< strict-transport-security: max-age=31536000
< vary: Accept-Encoding
< x-nf-request-id: 01GS7HP2FXSWPSF8RP0896GZ31
<

The apex is a 301 and www is a 200 with the site content.