DNS routing not working on Heroku app - heroku

I'm trying to setup a custom domain for my Heroku Cedar stack app, but it's not working.
I've tried entering 'host www.mydomain.com' command' in Terminal, but it yields no output.
I've already changed my DNS settings and added a 'CNAME' host: www, direct to: my domain.herokuapp.com but still it's not working.
What could I be doing wrong here???
Thanks,
Faisal

The fact that you're not getting any results in terminal for host then the problem lies with your DNS settings - it sometimes takes a while for updates to propogate across the internet, I usually allow for 24 hrs to be sure. If it still doesn't work then you should get in touch with your DNS host.

You also have to add domain entries to your Heroku app:
heroku domains:add yourdomain --app yourapp
The "-app yourapp" is not required if you are in the root directory of your Rails app.
You can repeatedly add more than one domain to your Heroku app.
Here is an article about adding custom domains and DNS setup, at the Heroku Dev Center:
https://devcenter.heroku.com/articles/custom-domains

Related

Heroku Custom Domain Not Found (404)

I want an application hosted one heroku to be reachable through the api subdomain.
The issue is that when i reach the website, I get a Not Found error message. Calling the url has no impact on the logs so I know the application is not reached.
By reading other issues on stack overflow, I can see that many people did not properly add the custom subdomain but I don't think that's the issue here. I created the subdomain through heroku's web interface.
If I run this in my terminal
$ heroku domains -a myapp
I get the following result
=== stickyhabitsapi Heroku Domain
myapp.herokuapp.com
=== stickyhabitsapi Custom Domains
Domain Name DNS Record Type DNS Target
api.stickyhabits.app CNAME mydnstarget
The DNS is managed by netlify. With their interface, I created a CNAME pointing to the DNS target supplied by heroku. Any Idea what might have gone wrong ?

Heroku and GoDaddy DNS configuration

I have been struggling to configure my Heroku to point to my domain name registered with GoDaddy.
I've setup my Heroku domain:
And I've configured my CNAME www to point to www.ithhero.com.herokudns.com
So far all tutorials/examples I've seen have had a different DNS target e.g. www.ithero.herokuapp.com . And even though I have followed the steps no results have been yielded. Godaddy and Heroku have been bouncing responsibility between them when raising an issue with either.
What am I doing wrong?
You postet it a while ago so I assume you found a solution already, but you should only change your CNAME value from:
www.ithehero.com.herokudns.com
to
ithehero.com.herokudns.com
This is definitely an issue on GoDaddy.
If you try the following, you can see that the domain has been setup correctly from Heroku's side:
curl -v -H "Host: www.ithehero.com" www.ithehero.com.herokudns.com
Also, if you check your DNS resolution, your CNAME's haven't been propagated at all: https://www.whatsmydns.net/#CNAME/www.ithehero.com
I would go back to GoDaddy and get them to have a look at this.

Octopress blog deploys on localhost, has no log errors, throws "no such app" message on Heroku

I have an Octopress blog (amyhua.me, github.com/amyhua/amyhua-me) that I've generated with several posts and have deployed to Heroku. I've configured my DNS correctly (product check on DNS configuration passes), and the blog works on my local host. I did a git push heroku master which was successful, and the heroku logs show no apparent errors. But when I try to visit my heroku app at amyhua-me.herokuapp.com, it shows a message:
"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 even started over with a new heroku app, deleting my former amyhua-me heroku app, and creating a new one I named amyhua-me (since my DNS servers point to amyhua-me.herokuapp.com), and it still throws a "No such app" message when I visit the herokuapp url.
Any ideas?
So for anyone who cares, I solved my own problem.
It was the difference between pointing to www.mydomain.herokuapp.com versus mydomain.herokuapp.com from my DNS server.
Pointing to mydomain.herokuapp.com goes to my heroku app, mydomain.
Pointing to www.mydomain.herokuapp.com goes to a "Heroku | No such app" page.
Lesson learned: don't use the "www" in your DNS configuration!
Or.... just avoid the hassle and use the Zerigo DNS heroku plug-in.

heroku and domain name conventions

(tried on Server fault, so going to try here)
Hi I recently setup my octopress blog at http://davidmjohnson.me. This domain works fine, but when I try http://www.davidmjohnson.me I get a "heroku no app found." Why is the www not working. Would really appreciate an explanation. I bought my domain name at dnsimple. Do I need to add a redirect from "http://www.dav..." to just "http://dav..." ?
Thanks
I'm guessing you need to configure this domain (and any subdomain) in the heroku CLI application (equiv. of ssh-ing into the machine and changing the nginx/apache location/virtualhost configuration).
I see they have an entry about this in their reference:
https://devcenter.heroku.com/articles/custom-domains
To elaborate a bit from the documentation:
Subdomains ( www.mydomain.com)
For each subdomain you want to setup configure your DNS provider using
a CNAME record pointing the subdomain to the applicable Heroku
hostname.
If the app is on Cedar, then CNAME the subdomain to myapp.herokuapp.com
If Bamboo, then myapp.heroku.com
In DNSimple a CNAME
record entry for a Cedar app would look like:
You can confirm that your DNS is configured correctly with the host
command:
$ host www.example.com
www.example.com is an alias for myapp.herokuapp.com.
myapp.herokuapp.com is an alias for ar.herokuapp.com.
ar.herokuapp.com is an alias for argon-stack-1879049447.us-east-1.elb.amazonaws.com.
argon-stack-1879049447.us-east-1.elb.amazonaws.com has address 107.20.157.144
...
Actually, it should really be the other way around. It is much better practice to point CNAMEs at Heroku apps, since Heroku apps have no real "static" IP. Since naked domains need an A-record, pointing a naked domain to a Heroku app makes everything much less stable. So the best practice is to forward your naked domain to a "www" subdomain, and then point the "www" CNAME to your Heroku app.
Heroku goes into detail about this here.

Heroku and Zerigo Setup Issue

EDIT2: Waiting to see if my changes were successful.
EDIT: I reinstalled everything using the command line Zerigo install command (the original question was for manual setup). THe problem now: the custom domains I set up do not work properly. Visiting the custom domain simply returns an error in Chrome: "Oops! Google Chrome could not find www.myapp.com" even though the custom domain I added was "www.myapp.com?
I've been trying to set up a custom domain on my Cedar Heroku app by following instructions at https://devcenter.heroku.com/articles/custom-domains and https://devcenter.heroku.com/articles/zerigo_dns.
In the tutorial for setting up a domain on Zerigo, one of the instructions for adding a host is to add the IP address of the webserver. How do I go about finding this information? I'm having trouble finding any resource that helps me with this.
Am I supposed to be adding the IP address of my app at _.herokuapp.com? When I try to do a look up of this address, I never get a consistent address (probably because of Heroku's many servers). Any help is appreciated.
Linking Zerigo and Heroku is a three step process.
(1) Use the heroku addons:add zerigo_dns:basic command or add Zerio manually through the add-ons page on your Heroku app.
(2) With your registrar or hosting provider to have the domain resolve properly. For Zerigo add all nameservers:
a.ns.zerigo.net
b.ns.zerigo.net
e.ns.zerigo.net
c.ns.zerigo.net
d.ns.zerigo.net
(3) And this is the step I think you may be missing. Log into Zerigo either through your Heroku configuration panel under "add-ons" or log into Zerigo directly. Select the DNS tab next to Account and Servers. On the left panel select the domain you have resolving to Zerigo: this domain will appear. Within this domain under "Nameservers" next to "Hosts" click "Add Snippet". Add both the recommended snippets proxy.heroku.com and the redirect record that excludes the www.
Wait the TTL period (usually 15 minutes) and your domains will work as expected.

Resources