Pointing the Domain Apex to Heroku

Table of Contents

Your domain apex is the second or third level domain provided to you by your domain registrar. For example, dnsimple.com is the apex domain for DNSimple.

To point your apex to Heroku you have 2 options:

  1. Use the Heroku one-click service.
  2. Manually add an ALIAS record.

Once your apex domain is pointing to correct place you will have to configure the custom domain at Heroku.

Using the Heroku one-click service

You will have to choose what one-click service to apply depending on whether your app uses SSL or not. If your app does use SSL you will have to use the Heroku SSL service. If your app does not use SSL you will have to go for the one named just Heroku.

Heroku services

To apply the Heroku one-click service to your domain follow these instructions.

Adding an ALIAS record

If you are using an SSL certificate, you must point the alias to the Heroku SSL endpoint or your browser will display a certificate error when accessing the HTTPS version of the site.

These are the steps that you will need to follow to add an ALIAS record that points your apex domain to your Heroku application.

To create an ALIAS for the apex domain
  1. Log into DNSimple with your user credentials.
  2. Follow these instructions to edit your domain’s records.
  3. Click and select the ALIAS record type.

    Add a Record

  4. In the form enter the following settings:

    Alias Settings

    • : leave it blank as we want to create an ALIAS for the apex domain.
    • : enter your Heroku endpoint URL. If you are not using SSL the endpoint it will look like myapp.herokuapp.com. If you are using SSL the endpoint it will look like myapp.herokussl.com
  5. Press to create the record.

Heroku endpoints can be either myapp.herokuapp.com or example.com.herokudns.com. You should use example.com.herokudns.com if you are using Heroku SSL and myapp.herokuapp.comif not.

Setting up your custom domain at Heroku

Once you have set up the domain using either the one-click service or adding an ALIAS record you will have to configure your custom domain at Heroku. Their support site has a comprehensive article on how to accomplish this.