Heroku domain connection failing - heroku

I signed up with Heroku hobby plan ($7 / month), and that part works fine, but the problem is, I specified the domain in Heroku like this: www.marcosbackyardswimming.ca, and in go daddy, I did CNAME, host: www, pointsto: Heroku.dns
the problem with this is, the only way it actually goes to the site is when I go to www.marcosbackyardswimming.ca, and if I just type in marcosbackyardswimming.ca, it doesn't go there. how do I redirect or specify somewhere to go to www.marcosbackyardswimming.com even if I just type in marcosbackyardswimming.com?

The annoying thing is that Go Daddy and Heroku don't play nicely. Here are a few pointers.
Make sure SSL is set on Heroku.
Remove the superfluous Go Daddy A records
Set up forwarding on Go Daddy with https:// protocol to www

You can achive that using this: https://imranhsayed.medium.com/adding-your-custom-domain-to-heroku-app-cdd68d2db67f

Related

How can i connect my domain name to my heroku app

I buyed domain. After that i hosted app on heroku and now i am facing issues to linke my domain name with my app on heroku.I followed a lot of videos on internet but none of them is working.
Last one that i tried is:
https://www.youtube.com/watch?reload=9&v=kKGSGT7mSnQ
but there when i try to copy paste my heroku app url in the points to field i get
Enter either # or a valid host name such as: "subdomain.domain.tld"
error.
Can somoene tell my how can i do this thing please ?
I need to add domain on heroku - example.com that generated dns target and that generated dns target needs to be pasted in the points to section in go daddy: It is not the full app url from heroku like previous...

Heroku:Custom Domain , ACM status:DNS redirect not forwarding path,What to do?

this is the first time i am buying a custom domain and i want to access my heroku java spring app by using the new domain name instead of the one provided by heroku.
The problem is that i get a ACM status:DNS redirect not forwarding path exception in heroku domain table,so it does not work.And i also do not know what this is and how to fix it even if i looked here https://devcenter.heroku.com/articles/automated-certificate-management#view-your-certificate-status
What i did so far:
I bought a custom domain name from godaddy.
Then i went to heroku settings >domains>add domain.
After that i got a new domain in the table.
I went to godaddy Records in order to add a new CNAME where i have added the domain name as name ( mycustomdomain. com) and the very long DNS Target that was autogenerated by heroku as value.
Now i went back to heroku and this ACM Status message is displayed:
DNS redirect not forwarding path
What am i missing?What do i have to do next to be able to successfully connect the 2 parts?
I saw some post arround here with "redirecting" but i am not sure if that applies to me or not.
Any help would be greatly appreciated.
If you're not already doing so, the host name for the CNAME record should be 'www' - and then the 'points to' would obviously be the URL Heroku gave you.
On the Heroku side, where you have listed the domain name itself, make sure to include the www. on the address itself - This is something I neglected to do a few weeks ago, once i added it - everything started working correctly.
I came across your issue because i've added a second URL (.com variation) and i'm getting that message with this second domain - Like you i'm unsure what i have missed...

How to point a TK domain to a heroku app?

I'm a noob. I've set up a tk domain here http://dot.tk/ I'd like to point to myapp.herokuapp.com. How can I do it?
I cannot figure out what entry to add, ARecod, Cname, MX record? What do I put in the HOST and IP fields? I keep getting "invalid data". Should I choose TK domain service or custom domain service?
In heroku I typed
heroku domains:add myapp.tk
Now what do I do?
Please, I'm not looking for an explanation as to how domain forwarding works. I'm sure as a network expert, you can spend hours studying it. I just need to know how to give my app a tk domain. Thanks
These are the panels I see
UPDATE
I've managed to do it with a CNAME record HOST=www.myapp.tk and IP=www.myapp.herokuapp.com but after 30 minutes they both stopped working and give a 404 error!? Is heroku blocking .tk domains?
UPDATE2:
I've registered another tok domain name. The www.myapp2.tk works but myapp2.tk does not work. My older www.myapp.tk and myapp.tk still give 404 error. Does anybody know how to fix this? I've done the following heroku commands:
heroku domains:add myapp.tk
heroku domains:add www.myapp.tk
heroku domains:add myapp2.tk
heroku domains:add www.myapp2.tk
In "cname record": host: www.myapp.tk ip-addres: herokuapp.com .
ping - a herokuapp.com in cmd and get ip, e.g. herokuapp.com [174.129.22.189]
add a-record host: myapp.tk ip-addres: 174.129.22.189 .
I couldn't get CNAME to work but everything seems to be all set with the following settings (I pinged herokuapp.com to get its IP):
SIDE NOTE: The validation on this page is finicky. Once it tells you that you've entered in a field incorrectly, it's smarter to just close the page and reattempt to enter the fields. I think their validation messes something up.
After you add those a record. Make sure they are included in your heroku app's domain list:
Heroku has dynamic IPs, you cannot ping to get an IP and just set it; might not work in other cases. See the answers here: How to point a TK domain to a heroku app? for correct solutions.

Pointing to subdomains with Heroku

I want both www.domain.ie and domain.ie to point to domain.herokuapp.com
I want secure.domain.ie to point to a third party booking engine.
I've run the following command:
heroku domains:add www.tankardstown.ie
Here is what my DNS setup looks like
The www.domain.ie and domain.ie redirects are working fine. The problem is with the secure.domain.ie. Currently, I'm getting this error:
Seems to be ok:
$ dig +noall +answer secure.tankardstown.ie
secure.tankardstown.ie. 86395 IN A 82.195.138.28
probably just a DNS propagation delay?
Found this issue whilst looking for something else, but thought I'd better answer this question for other weary travellers...
Looks this issue was because the domain was not added correctly to Heroku.
The OP only added 'www.' but should have added a wildcard domain or 'secure.' as a subdomain.
Actual Solution:
OP should have run:
heroku domains:add *.tankardstown.ie
Heroku has more information here:
https://devcenter.heroku.com/articles/custom-domains#add-a-wildcard-domain

Using email w/ Heroku and CNAME

I am in the process of setting up MX records on a HEROKU hosted app and am running into issues.
I have two CNAME's setup:
# myapp.herokuapp.com
www myapp.herokuapp.com
Site works fine as setup above. I am now trying to add email support by adding Google Apps MX records.
# ASPMX.L.GOOGLE.COM. MX 10 1800
--as well as four other MX fall backs--
Google Apps is saying it can't read the MX records. Is this because they are conflicting with the # CNAME record? If so, should I drop that and used the "Naked Domain" method (Setup three A records instead). Heroku makes it sounds like this method is highly discouraged vs CNAMEs for "#" non WWW.
Thanks for the help!
I found the best way to do this is to use Google Apps "Naked Domain" 301 Redirect Feature as described in https://support.google.com/a/answer/2518373?hl=en
1) Go to Admin Console - Domains - Change Naked Redirect
2) Redirect to WWW.your_domain.com
3) You will setup 4 A-Records in your DNS pointing your your_domain.com to
216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21
Now, when somebody points to your_domain.com they get 301 redirected to WWW.your_domain.com
This, btw is the same way gooogle.com behaves (301 redirect to www.google.com)
HT: http://smallchou.com/post/41388058201/heroku-and-root-aka-apex-or-naked-domains
Apparently they conflict. From Heroku:
Hi, you can't have CNAME entries on the zone apex.
You'll need to do the A records setup, or use a DNS provider that
supports ALIAS/ANAME records (DNSimple, DNS Made Easy, Route 53).
Removing the # CNAME and replacing it with A records seemed to work - within minutes Google picked up my MX records.
Final setup was a single WWW CNAME pointing to myapp.herokuapp.com. and three A records, each pointing to one of the Heroku listed IPs.
I was just struggling with something like this. When I switched to Heroku I added the CNAME to point my root domain (my_domain.com) to heroku and that link I guess forwards everything and kills your MX records for email, so the way I solved it was to instead point just my www subdomain to heroku via cname record (www.my_domain.com), and then I added a link forwarding my root domain (my_domain.com) to my subdomain (www.my_domain.com). Then my MX records worked again, but I had to wait a few hours for it to start working (luckily I gave up and went to bed and then in the morning realized it had worked). To point the root to the www subdomain, my domain name provider had a setting called pointers, and the options I selected were 'standard', 'URL' and 'www.my_domain.com'
Then to get SSL to work I had to add a redirect in the backend webserver code to redirect http to https, so I guess now if you type my_domain.com it redirects to www.my_domain.com and then redirects to https.my_domain.com, so kinda crazy but it works super fast so I guess it's good.
If your DNS provider supports ALIAS (Namecheap now does) you can easily get both email (MX, TXT records) and use the naked url (example.com, instead of www.example.com) with heroku.
Instead of choosing CNAME record type, pick ALIAS. Namecheap example of advanced DNS line would be like this:
(Type) (Host) (Value) (TTL)
ALIAS Record # heroku-weird-dns-target.herokudns.com 5 min
ALIAS will play along with both TXT and MX.

Resources