0
votes

I have application deployed in Heroku with Godaddy domain. After trying several methods done dns setup.

Add CNAME www with value DNS target provided by heroku.

This is working fine for domain with www. But I like to open domain without www(naked domain). which is not working currently.

What I have already tried and nothing worked for me.

  • Add CNAME with name(naked domain) and value(heroku app url)
  • (a) Add a Domain with naked domain name(domain name without www)
  • (b) Add CNAME with name(naked domain) and value(heroku app DNS Target value from(a))
  • Add Forwarding https:// with www.domain-name

Then tried configure DNS setup in cloudflare there everything problems got resolved, But there website's speed got slow and even some JS was not working. Tried several code changes and deployment, Nothing worked so finally back to GoDaddy for DNS Setup. Somewhere got to know that CloudFlare provide CName flattening which GoDaddy not. Due to CName Flattering Redirection works fine with CloudFlare.

Please suggest me steps to resolve this. domain URL

1

1 Answers

1
votes

Got response from Heroku team.

Redirecting from root domain [http://mysite.in/] to sub domain [http://www.mysite.in/] can be done at application level or on your DNS provider [GoDaddy] settings. Heroku or any other similar platforms won't have such an option.

Heroku recommends you to point the root domain to its DNS target with an ALIAS/ANAME record type. Unfortunately, Godaddy doesn't give that option. The root domain's DNS target can be an IP address as well, but the IP addresses of your application on Heroku keeps changing, at least once a day, so you can't use that as DNS target. We have an article on how you should set up the domains for a Heroku app, please give it a read https://devcenter.heroku.com/articles/custom-domains and let me know if you have any question there.

So the options you are left with is to make use of an add-on like Quotaguard which will give you a static IP address against your Heroku application, this IP can be used as DNS targets or change the DNS provider, we have a list of DNS providers which support ALIAS/ANAME record type.