0

I need to create something like: http://username.mydomain.com.

I´m using ASP.NET and my web application will be hosted in a IIS Server.

According to this answer I must add an additional website in IIS named username.mydomain.com. Does it mean that if I have one million users I have to create one million of additional website?

I don´t think this is the best solution.

Community
  • 1
  • 1
Luis Teijon
  • 4,769
  • 7
  • 36
  • 57
  • Is it 100% necessary to create username.mydomain.com? Can't you get away instead with doing mydomain.com/username? – mason Apr 19 '17 at 01:33

1 Answers1

1

You don't need a separate website for each additional account - you just need a new HTTP Host header binding. You can do this either by creating a new binding for each additional subdomain, or use a "catchall" (default) binding that handles all requests for a given port binding. IIS 10.0 (Windows Server 2016) finally added support for "wildcard" host-headers so that's now the preferred option for this scenario: https://www.iis.net/learn/get-started/whats-new-in-iis-10/wildcard-host-header-support

Dai
  • 141,631
  • 28
  • 261
  • 374