Using a custom domain from name.com with heroku - heroku

I want to use a domain I bought from name.com to be the domain name to my heroku appliation.
This is what I did.
I added my custom name to my Heroku app.
I copied the DNS Target that Heroku generated.
I then went to name.com and used a CNAME entry.
In the HOST entry, I tried both '*' and 'www' (without the quotes). By both i mean, two different occasions.
In the TARGET entry, I used the DNS Target that Heroku generated.
Now, when I visit my_domain.com I get that this page does not exist.
When I visit www.my_domain.com, I go to the heroku domain, not MY app, and I get a message from heroku that there is nothing here yet.
I get the same results even if i use '*', or 'www' in the HOST entry (without the quotes).

I found the solution.
On heroku, use two domain names for your app. One with 'www' and onw wihtout 'www'.
Then, just make two CNAME entries, back on name.com. The one will be the Domain Name with the 'www' from Heroku, with the appropriate DNS Target. The one will be the other domain name, with its appropriate DNS Target.

Related

Deployed heroku app not showing up on custom domain

I set up a custom domain for my heroku app, which worked ("Theres nothing here, yet").
I then deployed my first version of the app to heroku and tried to access it via the custom domain, but still got the message "Theres nothing here, yet".
The deployment was successful and the app can be reached via appname.herokuapp.com.
How do I get it to show up on my custom domain?
I had the same issue this morning but managed to resolve it.
I added my custom domain via the settings menu of the heroku dashboard (web page) and then added the heroku DNS target to a CNAME record with my DNS provider (GoDaddy). After just a few minutes the DNS target URL was pointing to the purple "There's nothing here, yet" page. 10 or 15 minutes later my custom domain name was also pointing there, but no sign of my app.
Researching the issue led me to your post and also to https://support.dnsimple.com/articles/heroku-error-nosuchapp/
Following the instructions at the bottom of the page I used the heroku command line to add a 'www' version of my custom domain.
heroku domains:add www.example.com
Immediately after this my app showed up at my custom domain. I didn't even need to add the 2nd DNS target to my DNS provider. It just worked.
Curiously, pointing my browser directly at the DNS target URLs does not work.

Domain name not routing with Heroku and Namecheap

I recently purchased a domain name with namecheap.com, and added a CNAME record from my Heroku app where I am running the application. I am sure that I added the correct domain name to my Heroku app, and the correct DNS target to my CNAME on Namecheap web settings.
Previously it was working, but this morning I purchased an SSL certificate on Namecheap, and my domain just points to a Namecheap page saying "This domain is registered with Namecheap".
I followed all the steps to properly activate the SSL certificate, and it even says it's activated on Namecheap on the domain I want. Also what's strange is the the Heroku domains appear to have good ACM status.
So on the surface everything seems to be all right, but when you go to my domain my app doesn't show up.
Any idea as to why this is? Also if you have any more information you want to know feel free to ask.
I figured it out. I had to delete the default records on the domain. Initially namecheap sets a reroute, and CNAME for their parking lot page.
These need to be removed so that they don't interfere with the domain routing that you want.

How to configure DNS records for Name.com and a Heroku app

I'm a bit confused about how to set up the DNS records for my domain at Name.com so it can correctly point to my Heroku app.
I found DNS configuration documentation at heroku's site but I'm still confused.
I'm under the impression that I need to set up a CNAME record for all subdomains and an A record for my root domain.
Also, on the name.com website, when I try to add a CNAME there are three blank fields I need to fill out which kind of confuse me: "Host" (where I enter '*' so it applies to all subdomains?), "Answer" (where I enter the DNS Target?), and "TTL"
Any help would be greatly appreciated. Thank you.
Fully detailed steps (2)
1). Visit Heroku apps dashboard
Choose your app
Click "Settings"
Find text "Add Domain", click button
Add your site with www subdomain:
www.yoursitename.com
Copy the returned "DNS target" value
2). Visit your name.com account
Find link text "Manage DNS Records" and visit link
"ADD RECORD" row with the following content:
Type:
Host:
Answer:
CNAME
www
📋 DNS target value from clipboard
(SAUMITRA KUMAR's answer, is what helped me write this answer.)
Don't use an A-record for your root domain. Heroku is using volatile IP addresses, which means the IP you configure in your A record can stop working at any moment without notice.
See https://devcenter.heroku.com/articles/apex-domains
On your root domain, you need to either setup an HTTP redirect to your www subdomain with your DNS provider, or use another provider which offers CNAME records for root domains.
As for the CNAME in your subdomains, yes, "Host" would be "*" to be all your subdomains.
Answer will be the endpoint provided by heroku, in the form appname.herokudns.com..
TTL means how often the DNS cache should be refreshed with the clients. Using the default (or 3600 if they don't provide any) will work here.
Here's what worked for me. Start with typing this in the Heroku CLI
Heroku domains: add www.youwebsitename.com --app yourherokuapp
This should give you a DNS target.You can obtain this from the your app settings as well on the website . Copy it and save it because we are going to need it later.Then after this run
heroku domains:wait for www.youwebsitename.com --app yourherokuapp
Then visit name.com and under your domains visit your dns records . There add CNAME entry with HOST equal to "www.yourwebsite.com" and ANSWER equal to whatever the dns target that heroku supplied you with .
Go ahead and visit your website , it'll work , if it doesn't make sure that you've used www with your website name . To fix this issue add an ANAME entry with "yourwebsite.com" as HOST and heroku dns again as target . It should reflect the changes within few hours .

Can't see my domain name when using Heroku

I got a domain name "raghavkumar.work" from name.com recently and I'm using Heroku servers to run my personal website. I added "www.raghavkumar.work" and "raghavkumar.work" into the custom domain addons in Heroku like so:
Then I went into name.com and I added three A records that mapped "raghavkumar.work" to three IP Adresses associated with Heroku like this:
I type in "raghavkumar.work" into my address bar, but it immediately redirects to the heroku app address. Here's what I see in the address bar:
How can I get my own domain name to show up instead of this annoying heroku app address name? No matter what I do, I can't get my own domain name to show up. It's always redirected to heroku's address. Thoughts?
Do you have a CNAME file?
...just a file called CNAME (no extension) with nothing but the bare domain name inside it (raghavkumar.work)...
https://devcenter.heroku.com/articles/custom-domains

Media Temple and Heroku CNAME

I am using Media Temple to configure my DNS settings for a domain. I recently launched an application on Heroku and want to set a subdomain of my domain to be the CNAME for the Heroku application. The issue is the DNS editor places a period at the end of the Heroku domain name when I enter it as a CNAME, and Heroku shows an error that this is not a valid domain.
In my DNS settings, I have:
subdomain.domain.com CNAME appname.herokuapp.com
When I save this, it shows up in the settings as
subdomain.domain.com CNAME appname.herokuapp.com.
Any ideas on how to remove that trailing dot?
I ran into this problem the other day when setting up CloudFlare for my Heroku app. "I do not think it means what you think it means."
With Heroku, you have to add domains that your app will be accessible from, even if your managing DNS elsewhere. Here's there documentation for how to do it. Basically, you can do this from the terminal:
cd into your app's directory
heroku domains:add subdomain.domain.com to add the subdomain like you want.
Also, on mediatemple, I think you might need to put just the subdomain part instead of subdomain.domain.com, though it'll probably work either way. As shown on the knowledgebase article from launchrock on adding a CNAME with Media Temple:
"5. In the Name field, enter the part of the address you chose to use for your website with
LaunchRock. For example, if you chose signup.yoursite.com, enter signup in the Name field."

Resources