I'm helping a friend out with her Rails App, and this morning the custom domain started automatically redirecting to freelancer.com instead of the App. The automatically created Heroku subdomain, i.e. 'randomapp.herokuapp.com' is still working fine without any issue. No new changes have been pushed to the Heroku repo for approximately a week, and the custom domain worked fine for months - until this morning. Were we hacked? Maybe a problem with the DNS? Any insight is greatly appreciated as I'm not particularly well versed in this.

  • What are your DNS entries??
    – closetnoc
    Apr 23, 2015 at 1:33
  • Is this what you are referring to? www.resilientapp.com Server: Address: Non-authoritative answer: Name: www.resilientapp.com Address:
    – LDro
    Apr 23, 2015 at 3:01
  • Okay. is ec2-184-73-235-153.compute-1.amazonaws.com. Do you have a site there (Amazon)?? If so, check to see if there is an .htaccess file in the web root directory. I do not know how Heroku works, but I seem to remember a similar issue asked here sometime back.
    – closetnoc
    Apr 23, 2015 at 3:23
  • Looking at: devcenter.heroku.com/articles/custom-domains you need to have a domain name defined at Heroku and a CNAME record pointing your domain name and www to your Heroku sub-domain. When I do a dig www.resilientapp.com any I get an IP address and not a CNAME. You may need to go through your original Heroku set-up and re-do some of it as well as check your DNS records. Your DNS records may be hosted with your domain registrar so you may need to log on there to see your DNS records.
    – closetnoc
    Apr 23, 2015 at 3:32

1 Answer 1


This sounds like an DNS zone file issue which you will need to take up with your DNS provider.

If the CNAME record where replaced with an A record as seems to be the case based on the comments then the connection would no longer to go Heroku, it would instead go to the server with that IP address (which as has been mentioned in comments is an AWS EC2 instance (virtual server). In this case the settings on Heroku are unlikely to be at fault. If the settings on Heroku where the issue then connecting to the domain would just give some general server error, or perhaps a Heroku specific error page, but it wouldn't connect to an alternate server. Whether you where hacked or whether there was a glitch with your DNS provider is unclear based on what you are saying.

The other issue that may have occurred is that the domain may have expired without being renewed. If that happened then someone else could have swooped in and bought it (a very common business model online) and mapped it to their server's IP in order to direct all traffic that used to be going to your site to their site in an attempt to get more traffic and perhaps more business.

The two steps you should take are to check your domain name is still registered, has not expired, and is still owned by you, after which then check with your DNS provider and check the zone file records to see if the records are correct or not and the correct CNAME record is pointing to Heroku.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.