How to point a TK domain to a heroku app?

4k Views Asked by At

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

enter image description here enter image description here

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
3

There are 3 best solutions below

0
On
  1. In "cname record": host: www.myapp.tk ip-addres: herokuapp.com .

  2. ping - a herokuapp.com in cmd and get ip, e.g. herokuapp.com [174.129.22.189]

  3. add a-record host: myapp.tk ip-addres: 174.129.22.189 .

1
On

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.

1
On

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):

my dot tk settings

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:

my heroku settings