title: Creating self signed certificate for domain and subdomains - NET::ERR_CERT_COMMON_NAME_INVALID
body: <p>I followed <a href="http://dltr.org/blog/server/573/How-to-install-SSL-on-windows-localhost-wamp" rel="noreferrer">this</a> tutorial for creating Signed SSL certificates on Windows for development purposes, and it worked great for one of my domains(I'm using hosts file to simulate dns). Then I  figured that I have a lot of subdomains, and that would be a pain in the ass to create a certificate for each of them. So I tried creating a certificate using wildcard in <code>Common</code> field as suggested in some of the answers at serverfault. Like this:</p>
  
  <pre><code>Common Name: *.myserver.net/CN=myserver.net
  </code></pre>
  
  <p>However, after importing this certificate into Trusted Root Certification Authority, I'm getting <code>NET::ERR_CERT_COMMON_NAME_INVALID</code> error in Chrome, for main domain and all of its subodmains, for example: <code>https://sub1.myserver.net</code> and <code>https://myserver.net</code>.</p>
  
  <blockquote>
    <p>This server could not prove that it is myserver.net; its security certificate
        is from *.myserver.net/CN=myserver.net. </p>
    
    <p>This may be caused by a misconfiguration or an attacker intercepting your connection.</p>
  </blockquote>
  
  <p>Is there something wrong in Common Name field that is causing this error?</p>