December 25, 2019

DNS record managing using now DNS.


I have a frontend application running using nextjs, and a GraphQL server written in Node.

Currently I have the frontend deployed on now, and the API running on heroku

I wanted to setup a custom domain, so that my frontend application will run on and the api running on

So, I bought a domain on Google Domain.

First, Setting up now's domain

So first, setting up domain for my frontend application.

In the domain section of nows dashboard, you can easily add your custom domain.


Then, you will need to configure the domain, and there are 2 ways.

  1. Changing the nameservers to zeit-world
  2. Change the ANAME to alias to zeit-world

But if you choose Google Domain, the first option is the only option, since ANAME is not allowed in Google Domain, (and probably most of the Domain hosting services).


So in your google domain dashboard, you will need to change the Nameserver to the one provied from now.


🚀 Done.

Setting up custom domain for Heroku.

If you are using, google domain it will very simple. You will just need to add uri provided from heroku and chuck it in the CNAME record.

But one small problem, is that you change the Nameserver to now, so you have to configure via now.

However now doesn't provide any fancy dashboard for DNS configuration, unlike Google Domain.


You have to do it from the command line.

First download CLI.

yarn add global now@latest

Then login.

now login

You can check and the current configuration of your DNS.

now dns

And finally to add the CNAME, it will be like this.

now dns add api CNAME



In the end, being able to configure in the command line was quite simple.

Though I was used to the fancy dashboard.

My blog is hosted on Github. If you'd like to leave a comment, report a problem, or contact me, then that's a fine place to do so.
Written by...
Kazushi Kawamura
Software Engineer based in Tokyo.
2019 © Kazushi Kawamura.