Reputation: 1079
I am trying to set up my herokupapp with my custom domain name from Godaddy. I hav gone through the process of getting it wokring using a cname through cloudflare.
Everything is working. However, when I go to my site at example.com my browser changes the url to example.herokuapp.com. Going to: http://www.example.com/ and www.example.com do work I don't want this obviously, what am I doing wrong?
Upvotes: 0
Views: 285
Reputation: 136890
Don't use an A record for your root domain. Heroku doesn't provide static IP addresses, so whatever value you put there won't be valid for long.
Since you're using CloudFlare you should be able to set up a CNAME
for your apex domain just like you did for your www
subdomain. CloudFlare has a feature called CNAME flattening that should make a CNAME on your root domain work as expected.
Regarding your comment that the www
subdomain started working, that's typical of DNS changes. They take time to propagate. Give it some time.
Upvotes: 1