My Rails app works with Heroku and if I set my CNAME at my domain register Afrihost to www.domain and without the www it works fine for an hour. Then it kills the app without the www domain infront and I have to log in and change the dns again.
Afrihosts states, because of a certain law it can't point a cname to both with a www and without a www in-front. Is that true for all domain registers?
What alternatives are there as I want to point to both with and without the www in-front.
Thanks in advance.
Erin
Go to the record editor and two DNS records, one for each host name, pointing to the Heroku SSL endpoint: Add an ALIAS record to point example.com to Heroku. Leave the Name of the record empty and set the Content field to the SSL endpoint example.com.herokudns.com. Add a CNAME record to point www.example.com to Heroku.
You can add custom domains to any Heroku app. Adding domains does not incur extra charges. For security purposes, you must verify your Heroku account to add domains to apps.
I liked the fix I went with. I just added a url redirect from mywebsite.com to www.mywebsite.com. So on type you just choose 'Redirect' and leave the host part blank. Then type in the url of your website 'http://www.mywebsite.com/' in the 'Data' section. Worked for me.
CNAMES cannot be used on naked domains (e.g. yourapp.com), only subdomains (e.g www.yourapp.com).
For the naked domains, you need an A record, or something like DNSimple's ALIAS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With