1

I create a simple Rails app and deployed it to Heroku. This is my app. I use Cloudflare to manage my DNS records and I try to achieve something like this:

enter image description here

This is all my current DNS records inside my Cloudflare:

enter image description here

My problem:

When I go to ordr.my, it's works like I wanted to. But when I go to www.ordr.my, it returns This webpage is not available error (I'm using Chrome browser).

Am I doing any mistakes here?

How to achieve something like inside the image above?

Note:

I did my research by reading Heroku and CloudFlare docs. But I found no luck since I'm not able to understand them very clearly.

Reference:

  1. Heroku Custom Domains
  2. Cloudflare Zone Apex
  3. Cloudflare CNAME Flattening
Zulhilmi Zainudin
  • 9,017
  • 12
  • 62
  • 98
  • What is the output of `heroku domains` - have you added both your root (apex) domain and your www sub-domain? – elithrar Jun 29 '15 at 23:24
  • 1
    Thanks for pointing this out @elithrar. It works after I added `www.ordr.my` inside my Heroku custom domain section. :) – Zulhilmi Zainudin Jun 30 '15 at 12:49
  • I'm not overly familiar with Heroku, but this might help some give some more insight to the roles for DNS and HTTP: http://stackoverflow.com/questions/30602324/how-to-detect-an-incoming-request-with-php-script-from-a-cname-subdomain/30630937#30630937 – Rick Buford Jul 01 '15 at 20:05

1 Answers1

0

Solved.

I added www.ordr.my into my Heroku custom domain section and change ordr.my CNAME (root domain) to my Heroku app just like below:

Cloudflare

enter image description here

Heroku

enter image description here

Zulhilmi Zainudin
  • 9,017
  • 12
  • 62
  • 98