3

I have a CNAME for www.mywebsite.com pointing towards example.herokuapp.com, and the original Heroku page is working just fine. However the CNAMEd website (www.mywebsite.com) is showing a Herokuapp 404. Why is this so? Why can't I point my CNAME towards the Heroku page properly?

  • Duplicate of stackoverflow.com/questions/16298/… maybe? – Alexis Wilke Nov 28 '16 at 1:22
  • Also in case you were trying with HTTPS, but I would imagine you would get an error other than 404. stackoverflow.com/questions/9294215/… – Alexis Wilke Nov 28 '16 at 1:24
  • Can you share more details on how you are using your CNAME? It is possible that the web server is not understanding the domain name in the request header and serving the request from another site. This is fairly common and could give a 404 for a request that does not exist though usually this at the file name level - for example, index.html. Confused? Don't be. It is likely the 404 is a result of the web server not knowing what you are talking about as a result of a bad CNAME. Having more details may help us help you. Cheers!! – closetnoc Nov 28 '16 at 5:36
  • @closetnoc Well, just to start off the info I'm using Cloudflare for DNS, the CNAME is a CDN with an automatic TTL, and it's name is www. – baranskistad Nov 28 '16 at 13:21
  • go to your heroku app settings and add a custom domain – tom Aug 2 at 1:15
3

You can't just set a CNAME and hope for the best when it comes to Heroku. You actually need to log into the Heroku admin panel and configure the CNAME record that you are creating so that Heroku knows what CNAME'ed domain maps to what app on the server.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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