I'm having some problems configuring the DNS settings for my custom domain to work correctly on Heroku.
I have set the DNS records as follows:
Host Type Points to
example.com WR www.example.com
www.example.com CNAME example.herokuapp.com
www.example.com.au CNAME example.herokuapp.com
However, the 'www.example.com' domain sometimes fails to load on my computer, as well as my client's phone. It seems rare for this domain to fail (it works fine on everyone else's computers that I've asked), but the fact that it doesn't work on mine and my client's computers is a problem.
However, the '.com.au' domain (and the heroku one) always works. Why is this?
Is there anything wrong with the configuration above? I followed the 'custom domain names' article on heroku to reach this configuration (I don't have much experience with DNS, unfortunately). The DNS provider I am using does not support ANAME or ALIAS so I went with the above config instead.
Thanks. Any help in getting the '.com' domain working on every device would be appreciated.
I'm not really sure, it may be a lot of things, DNS caching and other stuff.
But if you don't have a lot of DNS records, I suggest you use a heroku add-on like PointDNS (https://addons.heroku.com/pointdns) as it supports ALIAS.
Related
I have deployed an app on Heroku, and everything is going great when the app is being accessed from the herokuapp.com domain. I tried adding a custom domain and have followed the instructions from the documentation, but unfortunately, I encounter a DNS_PROBE_FINISHED_NXDOMAIN error when trying to access the app from my custom domain.
Some articles pointed out how Heroku requires the usage of ALIAS ANAME or FLATTENING records, which may not be available in DNS providers. I am using a local DNS provider where Name Server configuration is not directly accessible, and only the DNS provider admin can configure it on my request, so I am unable to check the CNAME Records and such (probably because I use .id domain, which I believe to have a somewhat specific configuration due to its affiliation with the country Indonesia, could be wrong though).
For my Name Server, because my DNS Provider requires at least two different name servers, I registered the domains for my Heroku app (from the Heroku settings dashboard > add domain and from the CLI) as follows:
my-domain.id
*.my-domain.id
www.my-domain.id
Is there anything I can do to fix this? Any help would be highly appreciated! Thank you!
EDIT:
I have just been informed by my DNS provider admin that the name servers I used, which I got from Heroku ([haiku].herokudns.com) does not have IP address. Is there anything I did wrong on the configuration?
As it turns out I managed to find my own mistake! It turns out that I provided the DNS Target as Name Server to my provider, which is totally not the same thing. What solved my problem was simply asking the provider to register a CNAME with the DNS target from Heroku as the value.
Be sure to provide the correct DNS Target for the domains as the DNS Target produced for registering root domains like your-domain.com will be different from the DNS Target produced for registering subdomains like www.your-domain.com or when using wildcard tag (*.your-domain.com). Also, note that Heroku doesn't recommend the usage of A Record for root domains, so be sure that your DNS Provider supports the record types needed as this Heroku article suggests.
Thank you #Ruurtjan Pul for getting in touch! Hope this helps!
I have some struggles setting up a custom domain for my rails application. I followed the "Summary of steps" on Heroku
For example: i bought the domain "mydomain.com". I added the domain by running heroku domains:add "www.mydomain.com"
And gave all Informations shown when running heroku domains(Domain Name; DNS Record Type; DNS Target) to my Domain-provider. But it seems like these are not enough informations therefore my provider is asking for a so-called "host" or subdomain, for which the DNS target is to be deposited.
So my question is what is this "host" and why is it needed?
EDIT:
So to clarify, the Problem was that i did not really knew what heroku is doing when running heroku domains:add
"Host" probably means the bare domain, i.e. mydomain.com, excluding 'www' at the front or anything else.
The subdomain is the bit that comes before that.
In doing domains:add www.mydomain.com you are asking heroku to respond to www.mydomain.com.herokuapp.com, so you need point your DNS to that.
Hence, on your DNS provider you probably need a CNAME record like www.mydomain.com.herokudns.com
That basically means send everything that they receive on your actual domain to that one, instead, which is the one that heroku serves your app on.
Different DNS providers do use slightly different terms, so you need to get the concepts clear of what you're trying to achieve, then you'll work it out. Also, delays in records updating can make it annoying to debug when you're trying to get this working.
Let me keep this as simple as possible. I have looked at a bunch of other posts related to this but haven't found an answer :(. I am hosting my web app on Heroku and using Gandi as my domain provider.
Note: The top answer from this post is what I used as my basis.
A few days ago I set up web forwarding on Gandi so that my mydomain.gg forwards over to www.mydomain.gg. I also set up custom domains in Heroku. It looks like this:
*.mood.gg wildcard.mood.gg.herokudns.com
www.mood.gg www.mydomain.gg.herokudns.com
mood.gg mydomain.gg.herokudns.com
I then went into Gandi and added these to my zone file so it looks like this:
# A 217.70.184.38
* CNAME mydomain.gg.herokudns.com.
www CNAME www.mydomain.gg.herokudns.com.
The A tag is there for the web forwarding where the IP points to a Gandi IP. Heroku changes IP addresses frequently, which is why I use CNAME.
Cool!
This all worked perfectly for 3 days, where I didn't touch my zone file or Heroku app for those 3 days at all.
So here is where the oddness begins. I upgraded my Heroku server to a more expensive plan and pushed some new code to it as well. A few hours later, my root domain mydomain.gg breaks and doesn't forward over to www.mydomain.gg. If I go directly to www.mydomain.gg it works perfectly.
So my question comes down to, where did this break? I never touched my Gandi zone file. All I did was push to my Heroku server and it seemed to break the web forwarding with Gandi. How did pushing to Heorku cause something to mess up with Gandi where all I'm specifying is a Heroku DNS that didn't change at all?
Another thing is, Gandi says they don't support naked domain CNAMEs which is why I use web forwarding. But then whats the point of this line in my zone file:
* CNAME mood.gg.herokudns.com.
Any help would be appreciated!
I have an application running on example.herokuapp.com. No subdomains, no HTTPS, just a basic, read-only application. I also bought my domain name example.com from name.com. How do I link my domain name to the Heroku app?
I found these two questions, but I can't understand them, don't have any idea what DNS, CNAME, A records etc. are..
How to configure DNS records for Name.com and a Heroku app
How to connect my domain bought on name.com with my herokuapp?
I would appreciate a dummy-friendly explanation on how to setup my domain name with my Heroku app.
From this page I understand (guess) I need to use an additional service such as DNSimple or CloudFlare, is this correct? I tried CloudFlare but there is an additional problem that my domain is already linked to 000webhost.com (which I want to remove) via name.com. Anyways, please just tell me what do I need to have in the end :) Also I prefer to use only the free plans, if possible.
Thanks in advance
Just bought a new domain on https://iwantmyname.com/. For the purpose of this post lets assume the domain is example.fm
I set up domain forwarding where I got example.fm to point to example.herokuapp.com. Everything seems to work, but after the site is forwarded, the browsers textbox displays the old example.herokuapp.com domain instead of example.fm
I already added example.fm to heroku with heroku domains:add example.fm, but that didn't seem to change anything.
Any thoughts?
So the people at iwantmyname.com have been extremely helpful.
It turns out that I only did URL forwarding, which isn't the recommended way of setting up a domain through them.
They have a specific system with dealing with heroku here: mysite.herokuapp.com
I got rid of the forwarding and set up my domain completely through Heroku custom domain DNS setup.