Search code examples
asp.netiiswebserversubdomain

Wildcard sub domains in IIS10


I want to access the application www.testsite.com using different wildcard Sub-domain such as :

abc.testsite.com
xyz.testsite.com

I have installed IIS Express 10 on windows 10 Machine and followed below steps:

  1. Created an simple Asp.net MVC web application and published in local folder

  2. Added an website in local IIS as www.testsite.com

  3. Mapped the website to the published folder.

  4. Added binding as *.testsite.com

  5. Edited host file with 127.0.0.1 www.testsite.com and 127.0.0.1 *.testsite.com


Now I am able to access www.testsite.com but not using any other sub domains
Am I missing anything ?


Solution

  • You can add wildcard entry on IIS, but you have to specify the list of subdomains that you are going to map. Ultimately host file will not support any wildcard entry.