How to use a domain name from name.com for a Heroku app? - heroku

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

Related

DNS_PROBE_FINISHED_NXDOMAIN error on Heroku

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!

Domain release from Heroku

I have just recently bought a domain from clickfunnels and apparently it wasn't released from Heroku site. Clickfunnels told me I should contact Heroku, but I contacted Heroku and got this message:
In order to verify ownership of this domain, we require that you set a DNS record on the apex/root domain (no sub-domain like 'www'). You'll want to make this change with your DNS provider.
I Contacted my DNS provider but they couldn't help me with that. What should I do? Just to let you know I don't understand much about releasing domain or all this programming stuff. Thank you in advance.
The domain could be pointed to any service, in this case Heroku.
Since you are the owner of the domain name, you can change the NS servers of your domain name, They currently are:
Name Server: NS1.DNSIMPLE.COM
Name Server: NS2.DNSIMPLE.COM
Name Server: NS3.DNSIMPLE.COM
Name Server: NS4.DNSIMPLE.COM
You can use the NS provided by your hosting company, or free NS..
Once you have changed those NS you will be able to manage your domain's DNS and point it to anywhere YOU like.
You do not need to really do anything with Heroku, unless you want to use Heroku as a hosting provider.

How does heroku know if you are the one who bought the domain name?

I am trying to use a custom domain name in Heroku. So I was following the general directions and I had a question about it.
So I want to get rid of the herokuapp.com in example.herokuapp.com, which requires that I buy the example.com domain name.
It says in the first step "Confirm that you own the custom domain name. If not, you can buy one with a domain registration service."
How does heroku know that I bought example.com in the domain registration service?
If you look at your Herokuapp.com dashboard, for your particular app, you'll find that heroku has issued you a specific domain name. Something like some-custom-string.herokudns.com. Notice that this is herokuDNS.com which is different from herokuapp.com (herokuapp.com is used to access your website publicly). Only you have access to this custom dns string.
When you buy a domain name from a registrar, it'll usually also provide a DNS server. You'll then add a CNAME record in your DNS settings to point to your heroku provided some-custom-string.herokudns.com url. Since only you've access to your DNS server settings, if Heroku finds that the cname entry is present in your DNS records, it'll be a confirmation that you own the domain. The steps to do this are described here.

Not able to redirect domain in Heroku (DNS)

I'm having hard times trying to redirect a custom domain on Heroku, have you guys had the same problem?
Configured custom domain on Heroku (already tried different variation):
The server asks for Server Name, so I add the only thing Heroku returns as the DNS:
Below there are two domains, the first says "servfail" (the current app domain), the second "nxdomain", which I've just bought it's fine.
Any advices? Should I deploy on another server? Thanks for the help!
You need to update the DNS servers of your domain fariba.cl to fariba.cl.herokudns.com at the domain registrar's end (from where you purchased the domain)
After that it will work fine.
For those facing DNS redirecting problems in Heroku, I suggest this Add-on that you can add to your app in Heroku (for free): PointDNS
With it you can get many types of adresses, including IP and/or n1.server n2.server and so on, in which you can add the address to your domain settings.

Heroku & DNS: Can http://nakeddomain.com aim at my heroku app?

So, I've been reading quite some content about this. The latest one being here, and the heroku doc.
At the end, nobody answers the question clearly:
Is it possible to have http://nakeddomain.com aiming at a heroku app?
Here's what I know:
It is easy to redirect http://nakeddomain.com to http://www.nakeddomain.com to CNAME http://myapp.herokuapp.com : I don't want to do that
It is sometimes possible to ANAME (or ALIAS, or CNAME depending on the DNS provider vocabulary) apex name to another record. But in that case, all records are CNAMEd or ANAMEd (even the MX for mail delivery) which makes mail#nakeddomain.com unroutable as redirected to heroku app which certainly doesn't handle it by default.
So I'm going to reformulate
Is it possible to have http://nakeddomain.com aiming at a heroku app while using mails#nakeddomain.com?
How? Which services to use?
How much does it costs if there are extras to pay?
Should I stick on CNAMing apex name and move the mailer to another service (Google Apps, or Sendgrid as some suggest in Stackoverflow) or is it making it worse?
Subsidary questions:
Been reading Cloudflare is quite nice. How does it help me?
We are using 1and1 as a DNS provider currently? Does it make it easier/harder anyhow?
Been also reading DNSimple allows more features than other DNS providers. Which one?
Since we send automatic mails from our app, SPAM filtering is also a concern from mails#nakeddomain.com, if that has to do with the required configuration.
Thanks for support
Apex domains have no impact on using the naked domain for emails - completely different types of record. I have domains using DNSimple CNAMEs and the same domain for email. One is a cname, the other is an MX reocrd.
I would suggest using DNSimple or the cheaper option DNS made easy - both support ALIAS records, with the $30 a year plan you get 10 domains. I typically using one or the other and Google Apps for email which works just fine. For applications to send email I use Sendgrid.
CloudFlare is a caching layer. To use them you have to move your DNS to them.
You can use 1&1 as your registrar but you then use one of the previously mentioned to host the DNS - they have far superior services. Both provide CNAME but also redirection at DNS level so you can have www.domain.com redirected to domain.com at DNS level and not in your application. If you use Sendgrid for sending emails I'm sure they have a SPF record you can put on your domain to help keep emails out of spam folders.
EDIT:
Cloudflare seems to be the good solution for me: brings CDN and naked domain through changing DNS servers to their own and they have a free plan.
I'm going to answer point by point to explain what I've done:
Is it possible to have http://nakeddomain.com aiming at a heroku app while using mails#nakeddomain.com?
Yes
How? Which services to use?
Only using DNSimple or DNS made easy, as they handle ALIAS/ANAME records.
How much does it costs if there are extras to pay?
Cheapest is DNS made easy with $30/year
Should I stick on CNAMing apex name and move the mailer to another service (Google Apps, or Sendgrid as some suggest in Stackoverflow) or is it making it worse?
Haven't explored this option much, but if your domain provider has decent mail services, no reason to move out of it. It probably costs more money for this service...
Subsidary questions:
Been reading Cloudflare is quite nice. How does it help me?
Finally did not end up using it...
We are using 1and1 as a DNS provider currently? Does it make it easier/harder anyhow?
1and1 doesn't have ALIAS/ANAME records. So I had to use extra service (DNS made easy in my case), they give you a list of dns hosts that need to be replaced in the 1and1 interface and then it takes care of the rest.
Careful: For beginners reading this, updating these entries won't assign changes all over the web at once as DNS is based a lot on caching. You need to take this in account when doing changes, if you have production services. You could end up with weird behaviors between like infinite redirects, cdn not properly redirecting, or OAuth redirects broken for a while ...
Been also reading DNSimple allows more features than other DNS providers. Which one?
More customization is possible with DNS made easy. Interface will be more user-friendly also.
Eg. 301 redirects instead of 302 for 1and1, PTR records and other newest DNS records
Since we send automatic mails from our app, SPAM filtering is also a concern from mails#nakeddomain.com, if that has to do with the required configuration.
I read PTR records were good to prevent SPAM, but as far as I understood, it doesn't make sense when using heroku because the whole point of this record is to aim IP-Address to nakeddomain.com which is not possible as heroku doesn't provide fixed IP-addresses.
Hope it helps.

Resources