In GoDaddy's DNS Zone Editor, you will want to configure your CNAME record www to point to @. In your A Record, you'll use a wildcard (*) to point to the IP address and a second A Record that uses @ as the host that will also point to the web address. This way,
subdomain1.example.com will forward to your IP
www.example.com will forward to your IP
silly.example.com will forward to your IP
anything.example.com will forward to your IP
Frequently Asked Questions
Can I point *.mydomain.example
to my Heroku app?
Yes, using the free Custom Domains feature of Heroku you can point a wildcard domain to your application.
What IP addresses should I use to point my custom domain to Heroku?
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. To ensure your domain always points correctly to the
routing mesh, configure subdomains (e.g. www in www.example.org
) using
a CNAME record:
If the app is on… Then CNAME the subdomain to
Bamboo yourapp.heroku.com
Cedar yourapp.herokuapp.com
Naked (or bare/apex) domains (e.g. example.org
) should be avoided
because of their availability and uptime consequences.
Why can't I add subdomain.mydomain.example
for my app?
In some cases, attempts to add a custom domain (like
subdomain.mydomain.example
) for an app may result in an error like this:
! mydomain.example is owned by another user
All applications for a given base domain must be owned by the same
Heroku account. The above error means that someone else has already
added a mydomain.example
custom domain to one of their apps.
www
which CNAME is pointed toyour-app-name.herokuapp.com
. – eQ19