IIS Server Name Change

Someone asked on Stack Overflow:

I have a certificate for that is valid for *.MyCompany.com. That is fine for my dev and test servers because the first part of the URLs for those computers ends like that.

I want to test this on my computer and the certificate is incorrect because my computer defaults to the url MyComputer.MyCompany.net.

Is there a way to fake out IIS in to thinking that my computer is .MyCompany.com or am I out of luck when it comes to testing this?

Thanks, Vaccano

I posted the following answer, which was chosen as the accepted answer and received 2 upvotes:

You should be able to edit the host header values for the IIS website to accept *.Mycompany.com. To get the DNS to resolve and work correctly, you may need to add an entry to your windows hosts file — mycomputer.mycompany.com 127.0.0.1. that will let you test locally.

Another option would be to use a self-signed cert for local development.


Originally posted on Stack Overflow — 2 upvotes (accepted answer). Licensed under CC BY-SA.

signed letter b

Dad. Geek. Gamer. Software developer. Cloud user. Old Car enthusiast.  Blogger.


Top Posts


profile for Nate on Stack Exchange, a network of free, community-driven Q&A sites
a proud member of the blue team of 512KB club
Thoughts, opinions, and ideas shared here are my own. © 2026 Nate Bross.