Using a Google Domain with Netlify

Using a Google Domain with Netlify

January 29, 2022
howto
blogdown, DNS, blog, Hugo, netlify, Google Domains

This site has a domain registered with Google Domains and is deployed on Netlify.

There’s a lot that I like about that arrangement. I’ve had a very good experience registering domains with Google Domains. And I’m a big fan of the whole Netlify continuous deployment model once it’s all set up.

One thing that I didn’t want to do was use Netlify’s DNS, mainly because doing so would mean missing out on some Google Domain functionality, including Google’s mail forwarding and its included Domain Name System Security Extensions (DNSSEC) implementation.

What I wanted to do was manage my domain through Google Domains, but still continue to deploy through Netlify.

Don’t follow Netlify’s standard directions #

This is the standard set of directions for using a domain from somewhere else with Netlify:

Don’t do that. Instead, keep using the DNS implementation with the original registrar (Google Domains in my case), and point at Netlify’s provided subdomain.

Point at Netlify #

Every Netlify website deployment comes with a default Netlify subdomain. In this site’s case, the default Netlify subdomain is kwanlin.netlify.app.

To get my kwanlin.com domain that was registered through Google Domains to point at my Netlify subdomain required that I tell Google Domains where to redirect traffic hitting kwanlin.com.

That requires a small configuration within Google Domain’s DNS section. Specifically, I had to define two Type A records for my domain, one with and one without the www. prefix, and direct them to the Netlify load balancer IP address of 75.2.60.5 .

This specif IP address comes directly from the Netlify documentation on how to Configure external DNS for a custom domain.

Direct domains within Netlify #

Once traffic going to a domain registered on Google Domains gets redirected to Netlify, Netlify needs to be told what to do with that traffic.

After all, the Netlify load balancer IP address can be a black hole. Without guidance, any traffic going there would just disappear.

To ensure that traffic from a domain goes to the right place within Netlify, configure the DNS settings within Netlify’s Domains section to direct traffic to the Netlify subdomain.

Conclusion #

And that’s it. Really not to much going on, but there are a few things to connect, including:

  • Pointing a domain at the Netlify load balancer IP
  • Telling Netlify to direct inbound traffic from a particular domain to a specific subdomain on Netlify

Things might act funny for a bit while the DNS changes propagate. It might be a simple matter of waiting before things start working properly again.

Once that’s working properly, everything should work seamlessly for any visitor. Plus now I can share @kwanlin.com email addresses and direct emails to wherever I want.

Resources #

The following guide is slightly different from what I propose above. This guide uses the Netlify nameservers, which I advise against above, mainly because it breaks some Google functionality like e-mail forwarding and DNSSEC. However, in their Step 3, they do provide a workaround for the broken email forwarding.