title: Certbot - DNS problem: NXDOMAIN looking up A for xxx - check that a DNS records exists for this
body: <p>So I tried to run the following</p>
  
  <pre><code>sudo certbot certonly --nginx --dry-run -d subdomain.domain.com -d www.subdomain.domain.com
  </code></pre>
  
  <p>That gave me a DNS problem, however, it worked when running</p>
  
  <pre><code>sudo certbot certonly --nginx --dry-run -d subdomain.domain.com
  </code></pre>
  
  <p>Am I missing something in my DNS records?</p>
  
  <p>I have sucessfully run</p>
  
  <pre><code>sudo certbot certonly --nginx --dry-run -d domain.com -d www.domain.com
  </code></pre>
  
  <p>Do I need to make a specific DNS record for the ´´www´´ part if I use subdomains?</p>
  
  <p><strong>Edit</strong>
  Result of running ´´dig subdomain.domain.com´´</p>
  
  <pre><code>; &lt;&lt;&gt;&gt; DiG 9.11.5-P4-5.1ubuntu2.1-Ubuntu &lt;&lt;&gt;&gt; subdomain.domain.co.uk
  ;; global options: +cmd
  ;; Got answer:
  ;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 45932
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
  
  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 65494
  ;; QUESTION SECTION:
  ;subdomain.domain.co.uk.           IN      A
  
  ;; ANSWER SECTION:
  subdomain.domain.co.uk.    1800    IN      A       xxx.yyy.aa.dd
  
  ;; Query time: 88 msec
  ;; SERVER: 127.0.0.53#53(127.0.0.53)
  ;; WHEN: Fri Feb 07 11:24:26 UTC 2020
  ;; MSG SIZE  rcvd: 64
  </code></pre>
  
  <p><strong>Answer</strong></p>
  
  <p>Create an type A entry with the host ´´www.subdomain´´ and you're good</p>