title: How do I correct the name of the security certificate does not match the name of the site?
body: <p>My IIS site is giving browsers problems.  They pop up a security warning that the security certificate does not match the name of the site.  I'm using a self-signed certificate for testing.  I view the certificate.  It has the name.</p>
  
  <blockquote>
    <p>DnsName.mydomain.com</p>
  </blockquote>
  
  <p>but the browser is using</p>
  
  <blockquote>
    <p>MachineName.mydomain.com</p>
  </blockquote>
  
  <p>There is a CNAME entry pointing DnsName.mydomain.com to MachineName.mydomain.com.</p>
  
  <p>Even so, they are obviously different.  Can you tell me how I can get a new self-signed certificate with the name MachineName.mydomain.com, and how to install it on my test web server such that browsers can use either name without getting this security warning?</p>
  
  <p>I can have the browser install any certificate a self-signed cert from my web server, that's not the problem.  The problem is the warning.  Here's a screen shot of what I mean.</p>
  
  <p><img src="https://i.stack.imgur.com/JvtkI.png" alt="Security Alert Dialog"></p>