'heroku zerigo dns - www.xxx.in working but xxx.in sometimes giving application error (sometimes working)

I am custom domain for my heroku app using zerigo dns.

www.domain.in is working fine.

domain.com should redirect to www.domain.in sometimes and sometimes giving application error.

Records in zerigo dns :

 1) type: redirect, domain.in, http://www.domain.in

 2) www.domain.in, cname, xxx.herokuapp.com

 another 3 A type records 

I think these are correct thats why sometimes it is working, but sometimes giving application error, as of now thinking that it is zerigo bug.

Related question I found - Root domain is not working properly



Solution 1:[1]

This setup should work on three conditions:

  1. Your root DNS has A records pointing to Heroku's designated routing IPs
  2. You have added your naked domain to your application (heroku domains:add example.com)
  3. Your application supports your naked domain

Check all these points, a problem in each one can cause things not to work.

If you are redirecting on the DNS/host provider level from the naked domain to www. then none of this is needed, and you have a configuration problem with your host which is out of scope for this question.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yuval Adam