Pointoing my Heroku Rails app to www and without www works only for an hour?

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.

Gracias de antemano.

Erin

preguntado el 31 de julio de 12 a las 11:07

3 Respuestas

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.

respondido 11 mar '13, 20:03

Thanks. Domain redirection just did the job! - Rafael De Alemar Vidal

how to add url redirect , is it in the code or in anything we can add? - kn3l

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.

Respondido 31 Jul 12, 11:07

Ok I understand. But how can I set up my heroku app then, because to work they want it to point to CNAME. - erin caminante

Encontré la respuesta https://devcenter.heroku.com/articles/avoiding-naked-domains-dns-arecords

I must use an A-Record.

Muchas Gracias

Respondido 31 Jul 12, 13:07

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.