title: Curl says "requested domain name does not match the server's certificate," but it appears to match
body: <p>I've set up a server on my local network, but I'm stymied troubleshooting HTTPS connections. When I use <code>curl -v</code> to make a request, I'm told, "requested domain name does not match the server's certificate." </p>
  
  <p>But the output itself appears to indicate that the domain does match: "reg.qa"</p>
  
  <p>What's the real issue here?</p>
  
  <pre><code>$ curl -v https://reg.qa/
  * Added reg.qa:443:172.18.0.4 to DNS cache
  * About to connect() to reg.qa port 443 (#0)
  *   Trying 172.18.0.4...
  * Connected to reg.qa (172.18.0.4) port 443 (#0)
  * Initializing NSS with certpath: sql:/etc/pki/nssdb
  *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  * Server certificate:
  *   subject: CN=reg.qa,OU=Web Test,O=MYORG,ST=CA,C=US
  *   start date: Mar 11 20:53:04 2020 GMT
  *   expire date: Mar 10 20:53:04 2025 GMT
  *   common name: reg.qa
  *   issuer: CN=reg.qa,OU=Web Test,O=MYORG,ST=CA,C=US
  * NSS error -12276 (SSL_ERROR_BAD_CERT_DOMAIN)
  * Unable to communicate securely with peer: requested domain name does not match the server's certificate.
  * Closing connection 0
  curl: (51) Unable to communicate securely with peer: requested domain name does not match the server's certificate.
  </code></pre>