title: Cloudflare & Heroku (DNS): An A, AAAA or CNAME record was not found
body: <p>I have tried to apply free SSL service provided by Cloudflare to my Heroku app.</p>
  
  <p>Although I registered my domain about 4 days ago, it doesn't work.</p>
  
  <p>When I try to access my domain (example.com and www.example.com) with Chrome, <code>This site can’t be reached example.com’s server DNS address could not be found.</code> is displayed.</p>
  
  <p>The following messages are displayed when I check the Cloudflare site.</p>
  
  <pre><code>An A, AAAA or CNAME record was not found for the www subdomain. The www.example.com subdomain will not resolve.
  An A, AAAA or CNAME record was not found pointing to the root domain. The example.com domain will not resolve.
  An MX record was not found for your root domain. An MX record is required for mail to reach @example.com addresses.
  </code></pre>
  
  <p>I could access my domain <code>www.example.com</code> before using Cloudflare.
  How can I use my domain with SSL?</p>
  
  <p>My setting summary in Cloudflare is as follows;</p>
  
  <pre><code>Security Level: Medium
  SSL: Full
  </code></pre>
  
  <p>I get my domain and set up as below on the home page which I get my domain.</p>
  
  <pre><code>sub domain: www
  type: CNAME
  content: floating-fortress-999999.herokuapp.com
  
  name server1: foo.ns.cloudflare.com
  name server2: bar.ns.cloudflare.com
  </code></pre>
  
  <p>When I try to <code>dig</code> command, the followings are displayed.</p>
  
  <pre><code>$ dig example.com
  
  ; &lt;&lt;&gt;&gt; DiG 9.9.5-3ubuntu0.7-Ubuntu &lt;&lt;&gt;&gt; example.com
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 301
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 512
  ;; QUESTION SECTION:
  ;example.com.                   IN      A
  
  ;; AUTHORITY SECTION:
  example.com.            9999    IN      SOA     foo.ns.cloudflare.com. dns.cloudflare.com. 2021450999 10000 0000 999900 9900
  
  ;; Query time: 53 msec
  ;; SERVER: 999.99.9.9#53(999.99.9.9)
  ;; WHEN: Fri May 13 21:11:54 UTC 2016
  ;; MSG SIZE  rcvd: 101
  </code></pre>
  
  <p>When I try to <code>dig</code> command with <code>ns</code>, the followings are dispaleyed.</p>
  
  <pre><code>$ dig example.com ns
  
  ; &lt;&lt;&gt;&gt; DiG 9.9.5-3ubuntu0.7-Ubuntu &lt;&lt;&gt;&gt; example.com ns
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 9999
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 512
  ;; QUESTION SECTION:
  ;example.com.                   IN      NS
  
  ;; ANSWER SECTION:
  example.com.            99999   IN      NS      bar.ns.cloudflare.com.
  example.com.            99999   IN      NS      foo.ns.cloudflare.com.
  
  ;; Query time: 173 msec
  ;; SERVER: 999.99.9.9#53(999.99.9.9)
  ;; WHEN: Fri May 13 21:12:53 UTC 2016
  ;; MSG SIZE  rcvd: 96
  </code></pre>
  
  <p>It would be appreciated if you give me any suggestion.</p>