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.
Related
I have a CNAME record for www.example.com with value of www.example.com.herokudns.com, and also for example.com with the value of example.com.herokudns.com.
The problem is that I do not know how to make MX records for a mail server on my domain provider server without losing the above functionality.
If I try to create MX records, the domain provider server complains that CNAME exists for example.com and I must remove it. If I remove it and create records for MX as instructed by mail server provider, the mail starts working but browsing to example.com is not possible. Only www.example.com continues to work.
How I could solve this? I tried to google and read about CNAME similar questions here, but can't find any solution.
This is a direct incompatibility with DNS based PaaS like Heroku which doesn't have a single static IP endpoint, and the nature of DNS. You do have options, but you need to assess how each one compliments or counters the very reason you chose an integrated platform like Heroku in the first place. Fortunately, there does look like there's some simple and effective solutions, depending on your exact configuration and providers:
The long and short of it is:
It's not standard to CNAME the apex '#'
See here, here, and here for more details.
Heroku explain that you need to use a DNS provider that supports CNAME functionality at the apex, or use sub-domains exclusively
See https://devcenter.heroku.com/articles/custom-domains#add-a-custom-root-domain
There's a good write-up on this specific topic here:
Heroku and Root (aka “apex” or “naked”) Domains
At face value, the PointDNS addon looks dead simple:
heroku domains:add example-domain.com
NOTE: I've never tried PointDNS and have no opinion of them at all. The suggestion is merely a copy/paste from a heroku article based on simplicity.
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
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.
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.