DEV Community

victorlamssc
victorlamssc

Posted on

Gatsby Hosting using Google Domain and DNS

Bluehost Blues

Like many who have started blogging, I naturally turned to WordPress.org as a starter. My wife's blog is currently using Wordpress and I had a fairly quick playbook on how to get something stood up pretty quick. There will more on this in a future post, but I wanted to get this out there since it's super fresh in my mind. I used Bluehost as a hosting service since it was already paid for and I knew how to spin up the Wordpress site quickly. I've had problems Bluehost before, but that's for another time. Just know that I've registered a custom domain from a different providers.

Google Domains as domain registrar

I purchased this particular domain through Google Domains. I could have gone through Namecheap or Bluehost itself as a registrar, but I like Google Domains for the bundled services that it comes with.

Move to Gatsby Hosting

I ended up setting with GatsbyJS since Javascript is my preferred language to work with and it had some real quick starter blogs that I could just use to get things rolling. I was going to use Netlify Hosting, but when I was researching GatsbyJS, I found out they had a hosting solution as well. The service included some cloud compute time to build my solutions as free. It's hard to beat free and their starter blogs just deployed out via one click. Less work for me. Yay!

Joy of jumping through DNS hoops

After I get the build pipeline set up and hosted with Gatsby's URL, it was time to move over my custom domain. While setting up the DNS connection settings, I'm usually accustomed to going the route of:

  • Get Customer Name Servers from Host > Go to Domain Registrar > Update Custom Name Server in Domain DNS settings.

It's usually pretty simple to configure, takes like a day to propagate through. Easy peasy. In this case, Gatsby Hosting threw me for a bit of a loop. For this scenario, I had to configure the DNS settings on Google Domain's DNS servers, but had some specific hosting settings that I needed to change. It's very similar to do the changes that Microsoft 365 has when importing a domain, but the settings presented were not as friendly.

For example, the information provided by Gatsby didn't quite line up with what Google Domains was expecting. For example, Gatsby listed the domain, the type, and the Value. Being inexperienced and after lightly reading the documentation that Gatsby and Google provided, I went to Google Domains and entered in the info to the following fields:

  • Gatsby Domain = Google Domain Host Name
  • Gatsby Type = Google Domain Type
  • Gatsby Value = Google Domain Data

GatsbySettings.jpg

I tried this for a day and no dice. Still wouldn't resolve. I knew something had to be wrong with me since I had already previously registered this URL and had it working just fine. The website itself was fine since it rendered using the Gatsby provided URL. So ruling things out, while also getting a DNS error in the browser, determined it's really a DNS error. I do have to say, one of the things that I don't like dealing with is DNS errors, since there is no real good quick feedback. It's always, update and then wait for it to propagate. I get why it does that since that's how it works, but it's frustrating none the less, when so many things these days offer some quick feedback.

The solution

The solution ended up pretty much being all my fault and me just not being able to read. The host name ended up being or "@". That's it! I had the domain name in there like a fool, but from the options presented and the fact I hadn't done this too many times, I just didn't know better. So for the Type A, It's blank with the IP that was provided to my by Gatsby Hosting. I then setup my www from Gatsby Hosting as the CNAME as instructed.

GoogleDNSSettings.jpg

There is room for improvement for new users. I can tell you that this now makes sense now that I've done it, but for a new person just starting out it's something that I missed. I could even see someone experienced missing it if they've never had to mess around with this type of hosting before.

An interesting reach out

Cool thing is that I tweeted about this on twitter to GatsbyJS and actually got a response. Props to you twitter user @SchauDustin for reaching out. I'm hoping this, along with my replies, are helpful for you going forward, since I do like your hosting service. It's quick, priced fairly and really get's any type of nonsense out of the way. Pretty easy to use and would recommend.

Top comments (0)