How to configure heroku application DNS to Godaddy Domain?
HerokuDnsHeroku Problem Overview
I have created a heroku application and wants to give domain to it from godaddy.com.
I have configured all three hosts provided by heroku but now I am getting error saying:
> Heroku | No such app > > There is no app configured at that hostname. > > Perhaps the app owner has renamed it, or you mistyped the URL.
I want to know: is there any other way to configure a heroku app?
UPDATED : New Approach Please use this link for new approach . Accepted answer is old feature.
Heroku Solutions
Solution 1 - Heroku
There are 2 steps you need to perform,
- Add the custom domains addon and add the domain your going to use, eg www.mywebsite.com to your application
- Go to your domain registrar control panel and set www.mywebsite.com to be a CNAME entry to yourapp.herokuapp.com assuming you are using the CEDAR stack.
- There is a third step if you want to use a naked domain, eg mywebsite.com when you would have to add the IP addresses of the Heroku load balancers to your DNS for mywebsite.com
You can read more about this at http://devcenter.heroku.com/articles/custom-domains
At a guess you've missed out the first step perhaps?
UPDATE: Following the announcement of Bamboo's EOL proxy.heroku.com being retired (September 2014) for Bamboo applications so these should also now use the yourapp.herokuapp.com mapping now as well.
Solution 2 - Heroku
I used this videocast to set up my GoDaddy domain with Heroku, and it worked perfectly. Very clear and well explained.
Note: Skip the part about CNAME yourdomain.com.
(note the .
) and the heroku addons:add "custom domains"
http://blog.heroku.com/archives/2009/10/7/heroku_casts_setting_up_custom_domains/
To summarize the video:
-
on GoDaddy and create a CNAME with
Alias Name: www Host Name: proxy.heroku.com
-
check that your domain has propagated by typing
host www.yourdomain.com
on the command line -
run
heroku domains:add www.yourdomain.com
-
run
heroku domains:add yourdomain.com
It worked for me after these steps. Hope it works for you too!
UPDATE: things have changed, check out this post https://stackoverflow.com/questions/11492563/heroku-godaddy-send-naked-domain-to-www
Solution 3 - Heroku
The trick is to
- create a CNAME for www.myapp.com to myapp.heroku.com
- create a 301 redirection from myapp.com to www.myapp.com
Solution 4 - Heroku
Yes, many changes at Heroku. If you're using a Heroku dyno for your webserver, you have to find way to alias from one DNS
name to another DNS
name (since each Heroku DNS endpoint may resolve to many IP addrs to dynamically adjust to request loads).
A CNAME
record is for aliasing www.example.com
-> www.example.com.herokudns.com.
You can't use CNAME
for a naked domain (@
), i.e. example.com
(unless you find a name server that can do CNAME Flattening
- which is what I did).
But really the easiest solution, that can pretty much be taken care of all in your GoDaddy account, is to create a CNAME record
that does this: www.example.com -> www.example.com.herokudns.com
.
And then create a permanent 301 redirect from example.com
to www.example.com
.
This requires only one heroku custom domain name configured in your heroku app settings: www.example.com.herokudns.com
. @Jonathan Roy talks about this (above) but provides a bad link.
Solution 5 - Heroku
I struggled a lot to resolve it Nothing seemed to work for me.
The steps I followed are mentioned here.
1 - Go to your App settings.
2 - Click on Add domain.
3 - A dialog will open & will ask you to enter the desired domain. (Please add it starting with www
for instance - www.abcd.com
)
4 - One added click on Next to move to the next dialog.
5 - After adding the domain you will get the DNS target, Now you need to navigate to GoDaddy and follow the following steps.
6 - Navigate to https://dcc.godaddy.com/domains & click on your domain.
7 - Once clicked you will navigate to https://dcc.godaddy.com/control/yourdomain/settings
8 - Scroll down to the bottom you will see Manage DNS.
9 - It will navigate you to DNS settings then add the entry similar to mentioned below and delete all other CNAME
records. Here the value of points is your DNS target that you got in the 4th Step.
10 - Then after some time your site should be mapped to the Heroku app URL.
Solution 6 - Heroku
You can't use the naked domain of your-domain.com
if it is not redirected to the www.your-domain.com
. Heroku use the www.yourdomain.com
which act here as a subdomain. So when you follow the default instruction to use your-domain.com
then you will need to assign both of them.
We can actually assign only the naked domain without the www.your-domain.com
. Use only your-domain.com
when the domain's dns provider (NameServers) support ALIAS or ANAME for the @ Record to example.herokuapp.com
without CNAME www.your-domain.com
to it.
It will let you to point www.your-domain.com
to other hosting separately (independent).
Solution 7 - Heroku
I pointed the non-www to 54.243.64.13
and the www.domain.com
to the alias.herokuapp.com
and all worked nicely.
Found the IP only after pointing www.domain.com
and then running the dig command on the www.domain.com
and it showed:
;; ANSWER SECTION:
www.domain.com. 14400 IN CNAME aliasat.herokuapp.com.
aliasat.herokuapp.com. 300 IN CNAME us-east-1-a.route.herokuapp.com.
us-east-1-a.route.herokuapp.com. 60 IN A 54.235.186.37
;; AUTHORITY SECTION:
herokuapp.com. 900 IN NS ns-1378.awsdns-44.org.
herokuapp.com. 900 IN NS ns-1624.awsdns-11.co.uk.
herokuapp.com. 900 IN NS ns-505.awsdns-63.com.
herokuapp.com. 900 IN NS ns-662.awsdns-18.net.
May not be ideal but worked.