Thanks to the now dns CLI command, managing existing DNS records with ZEIT Now is simple.

Note: This only applies to domains you bought via ZEIT or domains configured with our global DNS service.

Using Now CLI

In the examples shown below, the placeholder zeit.rocks represents a domain of your choice that was registered with now domains. Here are the sub-commands you can use:

now dns ls

Lists all the DNS records available for this domain. The list doesn't include records generated automatically by the nameserver (like a default SOA record or A / AAAA records created automatically for ALIAS records).

now dns add

Adds a DNS record to a domain of your choice. The following record types are currently supported:

  • A
  • AAAA
  • ALIAS
  • CAA
  • CNAME
  • MX
  • SRV
  • TXT

This is the syntax for the now dns command.

now dns add <domain> <name> <record type> <value> [mx_priority]
  • <domain> is the domain name
  • <name> is the subdomain that will be prefixed to <domain> (value @ refers to a domain without any prefix)
  • <record type> contains one of the supported record types shown above
  • <value> indicates the value for the record (like an IP address or a hostname)
  • [mx_priority] sets the priority of a certain MX record and can therefore only be used in conjunction with this record type


Examples

now dns add zeit.rocks ext A 127.0.0.1

Creates an A record that makes the subdomain ext.zeit.rocks resolve to the server located at the IP address 127.0.0.1.

now dns add zeit.rocks @ MX mail.awesome-now.us 10

Creates an MX record which makes the mail server located at mail.awesome-now.us responsible for handling emails sent to an address suffixed with @zeit.rocks.

now dns add zeit.rocks @ CAA '0 issue "comodo.com"'

Creates a CAA record that allows issuing certificates using Comodo for zeit.rocks and any subdomain under it.

In this case, you'll be in charge of certificate management for your domain.
Most probably, you'll need to use CAA records to:

  1. use a custom certificate for your Now deployment with now certs issue --ca
  2. run an app outside of Now with TLS for a subdomain

now dns rm <ID>

Removes a record by ID, which is shown in the now dns ls listing. Note that it may take a couple of hours before the change is fully propagated across our infrastructure.

now dns import <your-domain> <zonefile>

Imports the zone file downloaded from your registrar for this domain to ZEIT DNS.