Zerigo DNS

This add-on is operated by Zerigo

Automatic DNS management for your custom domains.

Zerigo DNS

Last Updated: 26 August 2014

custom domain dns zerigo

Table of Contents

Zerigo provides an excellent DNS service that is fully integrated with Heroku via the Zerigo DNS add-on.

Configure DNS servers

DNS changes can take time to propagate across the Internet. On Unix systems, you can verify that your domain is correctly pointed at Zerigo's servers by running dig ns yourdomain.com in the shell. You should see the five servers above listed in the output.

Before you can use the add-on, you will need to do a one-time setup for your domain with your registrar, configuring it to use Zerigo’s DNS servers:


Now you can use these domains with any of your Heroku apps by way of the Zerigo DNS Add-on.

Install the add-on

All you need to do now is choose one of the available Zerigo DNS plans, and install the appropriate add-on. Here’s an example using the free version:

$ heroku addons:add zerigo_dns:basic
Installing zerigo_dns:basic into myapp...done.

NOTE: If you already have custom domains defined when adding the Zerigo DNS add-on, DNS entries for your existing custom domain names will automatically be added to Zerigo’s systems.

Manage domain names

It is generally best practice to add in domains and subdomains starting with the lowest level first (ie. if you are adding a base domain and several subdomains, add the base domain first, then the subdomain.)

$ heroku domains:add mydomain.com

For the Cedar stack, this will automatically add two records: a Redirect record ‘mydomain.com’ to ‘http://www.mydomain.com’ and a CNAME record ‘www’ to ‘mydomain.herokuapp.com’ since root domains cannot be aliased with CNAMEs.

For the Bamboo stack, multiple A Records pointing to all the current Heroku front-end IPs will be added since the root domain cannot be aliased with CNAMEs.

Once installed, any domain or subdomain names added or removed via the heroku command-line tool will automatically be added to Zerigo’s globally distributed DNS servers. Updates happen instantly and Heroku will always keep your DNS records correct, meaning you never need to worry about them again.

For example:

$ heroku domains:add foo.mydomain.com

This will automatically add the records appropriate for the stack you are using. For the Cedar stack, it will generate a CNAME pointing foo.mydomain.com to foo.mydomain.herokuapp.com.

Of course, you can also remove a domain or subdomain name at any time with:

$ heroku domains:remove foo.mydomain.com

Managing MX and other host records

If your domain is handling mail, you will need to manage your MX Records. The Zerigo DNS add-on provides support for this by allowing you access to Zerigo’s web based management interface. Here’s how you use it:

  1. Go to the My Apps page.
  2. Locate your app, and click on “General Info”.
  3. Use the add-ons menu on the upper right, and select the Zerigo DNS add-on.
  4. Once on the add-on page, click the “Configure” for the domain you’d like to manage.

Clicking “Configure” will automatically sign you in to the Zerigo DNS management interface. In there, you have full control to manage your MX Records.

From the Zerigo management interface you can also add, edit and delete CNAME and A Records. We do strongly recommend that you let Heroku manage entries added via the Heroku command-line client.