Custom Domains on Bamboo

Last Updated: 07 April 2014

Table of Contents

This article applies to apps on the Bamboo stack. For the most recent stack, Cedar, see Custom Domains.

All Bamboo apps on Heroku are accessible via their per-app subdomain: In addition, you can assign custom domains to an app.

After assigning a custom domain to your app, you must also point DNS to Heroku. You can use one of the DNS management add-ons, or use your own DNS provider and manually configure the records for your domains.

Heroku setup

The first step is to tell Heroku to route requests for your domain to your app:

$ heroku domains:add
Adding to example... done

You can add any number of domains to a single app by repeating the add command with different values.

Remove domains with:

$ heroku domains:remove
Removing from example... done

You can also clear all domains at once:

$ heroku domains:clear
Removing all domains from example... done

DNS setup

Next, you must configure your DNS to point your application hostnames to Heroku.

Subdomains (

For each subdomain you want to set up, configure your DNS with a CNAME record pointing the subdomain to the applicable Heroku hostname, for example

In particular, add the following CNAME record in your DNS provider’s control panel.

Type Name Target

You can confirm that your DNS is configured correctly with the host command:

$ host is an alias for is an alias for

Output of this command varies by Unix flavor, but it should indicate that your host name is a CNAME of

Apex domains (

Zone apex domains (aka “naked” domains or “bare” domains), for example, are not supported on Heroku apps, because DNS forbids CNAME records on the zone apex. However, some DNS hosts provide a way to get CNAME-like functionality at the zone apex. Known providers:

For each provider, the setup is similar: point the ALIAS or ANAME entry for your apex domain to, just as you would with a CNAME record.

Wildcard domains

If you’d like your app to respond to any subdomain under your custom domain name (as in *, you can set up a wildcard domain.

First, add the wildcard domain on Heroku:

$ heroku domains:add *
Adding * to example... done

Then, configure your DNS registrar to point * at

If things are set up correctly you should be able to look up any subdomain:

$ host is an alias for

$ curl
HTTP/1.1 200 OK

IP addresses

The Heroku routing stack uses a collection of IP addresses that can change at any time, and using A records to point to your app is not supported. Instead, use CNAME records as described above.