Table of Contents
All Bamboo apps on Heroku are accessible via their per-app subdomain:
example.heroku.com. 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.
The first step is to tell Heroku to route requests for your domain to your app:
$ heroku domains:add www.example.com Adding www.example.com 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 www.example.com Removing www.example.com from example... done
You can also clear all domains at once:
$ heroku domains:clear Removing all domains from example... done
Next, you must configure your DNS to point your application hostnames to Heroku.
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.
You can confirm that your DNS is configured correctly with the
$ host www.example.com www.example.com is an alias for example.herokuapp.com. example.herokuapp.com is an alias for us-east1a.route.herokuapp.com. ...
Output of this command varies by Unix flavor, but it should indicate that
your host name is a CNAME of
Apex domains (example.com)
Zone apex domains (aka “naked” domains or “bare” domains), for example
example.com, 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
example.herokuapp.com, just as you would with a CNAME record.
If you’d like your app to respond to any subdomain under your custom domain name (as in
*.example.com), you can set up a wildcard domain.
First, add the wildcard domain on Heroku:
$ heroku domains:add *.example.com Adding *.example.com to example... done
Then, configure your DNS registrar to point
If things are set up correctly you should be able to look up any subdomain:
$ host any-subdomain.example.com any-subdomain.example.com is an alias for example.herokuapp.com. ... $ curl http://any-subdomain.example.com/ HTTP/1.1 200 OK
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.