Asked by:
Wildcard host header support

Question
-
User-781873136 posted
I want wildcard subdomains, which is not currently possible. I have heard all kind of arguments, all terrible.
<!--[if !supportLists]-->- <!--[endif]-->The HTTP 1.0 or 1.1 specfication wont don’t allow wildcard host headers
FACT IS: This is a configuration setting related to IIS and how to resolve a given hostname to a website. This has nothing to do with HTTP specification, but is strictly an internal matter on how the web server handle requests.<!--[if !supportLists]-->- <!--[endif]-->This is a DNS issue
FACT IS: Mapping a wildcard record to a single IP is a DNS issue, but mapping multiple hosts to one website is a web server issue and has nothing to do with the DNS configuration, even though it requires proper DNS configuration.Why would IIS not even yet support wildcard host headers? With current IPv4 limitations it is not possible to have one IP address for each website. It is a must, that the webserver are able to handle these matters.
There is no good argument not to integrate proper wildcard support in IIS. It is only a question of lazyness and restrictions, which aren’t necessary for any reason.
Please let the webserver support this.
Thursday, April 5, 2007 1:24 PM
All replies
-
User-806857765 posted
Why would IIS not even yet support wildcard host headers? With current IPv4 limitations it is not possible to have one IP address for each website. It is a must, that the webserver are able to handle these matters.
There is no good argument not to integrate proper wildcard support in IIS. It is only a question of lazyness and restrictions, which aren’t necessary for any reason.
Please let the webserver support this.
IIS does support multiple host headers. it is possible to host multiple websites(all pointing to same IP Address) in IIS.
Check this url to understand "How to user Host Header Names to Configure Multiple Web Sites in Internet Information Services"
Thursday, April 5, 2007 2:07 PM -
User-781873136 posted
I repeat "wildcard host headers". This means all *.example.com maps to a single website where *.example.org could map to a different website, even though both DNS records resolves to the same IP.
There are many different reasons for using a heavy load of subdomains and none, and it all requires, that you don't have to add all these manually (or by scripting).
Thursday, April 5, 2007 3:46 PM -
User989702501 posted
Well, for now all you can do is tweak the dns record and point it to the website with a particular IP. the magic here is not with IIS but DNS.
For more than 1 wildcard domain, as of know I think you can either redirect it via isapi or default page coding.
Friday, April 6, 2007 12:43 AM -
User1073881637 posted
That is correct. With IIS6, using something like ISAPI-Rewrite or your own custom redirect logic made using a wildcard DNS entry a dream. If you have a shared account someplace (which provides a static IP) and pointing a wildcard to your ip. You could have as many sub-domains without making any DNS updates. We use this at ORCS Web, and it makes things a lot easier.
IIS7 should work pretty much the same way, however you can do a lot more magic without all the work. The integrated pipeline makes this dropdead simple from a dev perspective. You can munge URL's all you want.
Friday, April 6, 2007 4:58 AM -
User-781873136 posted
This issue isn't posted to get temporary and bad fixes. It is raised to give attention to an ongoing problem with the both old IIS versions as well as the newest 7.0. It is brought up in hope for a extension to future versions allowing wildcard hostname as all other webservers.
As of this writing, the amount of registered .com-domains equals nearly 65 million. If we substract broadcast addresses and other network necessities and includes reserved networks, the .com-domains alone would require min. 2-3 % of all IPv4 ranges. This emphasize that it is not and will never be an sollution to have one IP address per website. Not all websites need this feature, but it is waste of IP adresses to just apply them, where better solutions are possible. In addition hereto, the amount of domains in total would easily triple the amount of .com-domains if not more.
My prayer is: The Microsoft IIS development team, please implement proper support for wildcard host headers. It isn't forbidden in any way and it is possible to do while still remaining strict HTTP conformance.
Also i repeat, that this is not a DNS issue. Wildcard host headers also requires the same wilcard A record as the current "solution" does. Therefore this is completely irrelevant for the discussion as well as the solution.
ISAPI-Rewrite offers redirects, but this is not the same as true support. There is a remarkably difference in the advantages gained from pseudo redirect and proper access to correct HTTP_HOST name values and so on. If you call this a solution, a solution could also be to use a different webserver. These are not solutions and does not deal with the reason for IIS not to support something, which is widely used.
Support it. Please!Friday, April 6, 2007 5:44 PM -
User989702501 posted
Mmm.... pray hard then.
If this is in spec, MS should and will do it.
If it's not... then pray again.Saturday, April 7, 2007 12:38 AM -
User-781873136 posted
But this has nothing to do with specification. It is usability, administration and convenience. The specification includes nothing about multiple host headers (which is possible) or many other of the features supported (scripting, virtual directories and so on).
The HTTP specification describes the rules of the web server to communicate with clients - not how the web server should be made or act internally.
Saturday, April 7, 2007 11:59 AM -
User989702501 posted
Well, that's your perspective. I think this is the part of how HTTP server process the incoming request, so it should be in the spec.Sunday, April 8, 2007 11:39 PM -
User-781873136 posted
Well, that is the beauty of a specification. There are no other perspectives than the specification, and it is not part of the specification how the server internally maps a request to a specific website. Remember; if I enter the address http://blabla.example.com/ the headers sent to IIS would be exactly the same even if the server supports wildcard host headers. There will be no difference whatsoever in the action. If I manually has added blabla.example.com to the website or if IIS support *.example.com has no matter for both the user and the specification. It is strictly an internally decision.
If you really believes, that it is part of the specification (where as I would point your attention to the RFC 2616, so you could read for yourself), why would you allow IIS to support multiple host headers? This is not a part of the specification. Having more than one website pr. server isn't either. These are features of the server, which not breaks specification compliance but more the software more attractive. As I said, virtual directories, server includes aren't part of specification either, but they are for sure nice to have - like ASP.NET, which has nothing to do with core HTTP either.
As far as I know, the Apache team is very strict when it come to protocol compliance, and they support it. Unfortunately, Apache is not an option - if it were, I would have made the change long ago. IIS need to support common used features. To emphasize this argument, I know several hosting centers who choose Apache over IIS - not because of cost, they still use Windows - as many of their clients have need for wildcard host headers.
Also note, that you wont have to use this, if IIS implements it.
Monday, April 9, 2007 1:46 PM -
User989702501 posted
Yeah, keyword - nice to have. I'm sure MS heard your feedback here. As of now, IIS 7 don't support this, it is up to the team to decide, if you have strong support case, I'm sure they will consider in future, etc.Wednesday, April 11, 2007 5:24 AM -
User1356161706 posted
Net_Srak,
We heard this request a couple of times during the last years. Unfortunately it never never made the top priority list. We are close to the finish line with IIS7 - the last small features go in as we speak, i.e. wildcard domain names won't make it into IIS7. The only way to do this (as far as I see it) is to get a dedicated IP address and route *.example.com to this IP address.
Sorry,
Thursday, April 12, 2007 2:00 AM -
User1785941354 posted
it's a pain that today IIS still doesn't support wildcard host header names. because of this, we can't provide our 12'000+ users with their proper subdomain on our service (username.mydomain.com). instead of they get http://mydomain.com/users/username
no, it's neither a DNS issue nor a "get your own ip" thing. we have one single ip for historical reasons and we're running a couple of websites on it.
is there a isapi filter that solves this matter? no just a simple redirect, but a way that permits us to know the original hostname from within asp.net. wouldn't be a problem with apache, but IIS seems to be stuck back in the 90ies.
Saturday, September 29, 2007 5:07 AM -
User1073881637 posted
If IIS doesn't fit your needs, use Apache. It's about the solution, not the technology. There are a few ways to do it in IIS I can think of off-hand.
1) Create a host-header for each user
2) Create a single site, use www.isapirewrite.com (3rd party rewrite tool) or something similar to redirect to a each users folder.
3) Write your own HTTP Module that rewrites the URL with ASP.NET.
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
http://weblogs.asp.net/scottgu/archive/2006/01/18/435870.aspx
I would probably recommend option #3 if you have ASP.NET developers, otherwise #2 is probably a nice clean solution. You set a wildcard DNS entry, create your folders then have one httpd.ini file to manage.
Saturday, September 29, 2007 9:46 AM -
User-731271501 posted
As Tomas says:
" is to get a dedicated IP address and route *.example.com to this IP address"yes. That's the dns part. Then in IIS you create a site with NO host header ( = the default website) for that IP. This indeed works - I have a few weeks ago created such a beast - but the consequences are:
(since it relies on the default website per ip)
1. I can just have one "wildcard subdomain site" per IP (I can have additional regular hostheader specified sites on the same ip, yes, but of course just one "default" website)2. The risk of being "hijacked". Actually happened to my site. Serverside I did some parsing to get the subdomain part out and rewrote the url <user>.domain.com -> /user.aspx?id=<user>
However I never verified that the MAIN domain part was indeed mine. What can happen:
<user>.DIRTYDOMAINNAME.com -> /user.aspx?id=<user>
If someone buys a "dirtyname" domain and simply points it to *your* IP.
Result: a duplicate of your site content is being served (still from your very own server) but under a nasty domain name. Which might be a problem...What happened to me and my brand new site was that the guy owning the other domain had misconfigured a DNS entry (and pointed a subdomain host of it to my ip).
It was innocent but still...Personally I really think this should get prioritized by IIS team (i.e being able to specify wildcard in hostheader) - while not being a showstopper for me, it sure is one of these things making you look towards Apache/Mod_AspDotNet
Monday, October 1, 2007 2:46 AM -
User59891307 posted
We are hosting a couple instances of DNN each with multiple portals. Each instance is setup on distinct IP as default web site. We let DNN figure out which portal to serve up based upon the subdomain(s)--DNN supports multiple aliases per portal. We also use the host file to create internal shortcut mappings to specific IP and again let DNN work out the intended portal site using alias.
Monday, February 4, 2008 9:49 PM -
User1953795828 posted
I really do not understand why this feature / must-have is still being dropped... Come on, it shouldn't be that much work for the IIS team, right? But it would help A LOT...
Wednesday, May 27, 2009 5:42 AM -
User-707569433 posted
I've read about this online, as I want to do a simliar thing.
The problem with the "IP" solution is it will only work for one site, on one IIS install, AND someone could register a dodgy domain name and point it to your IP and they'd get your website.
What I have come up with (and waiting on the tests to confirm) is a workaround using ISAPI_Rewrite (which I suspect some of you are using anyway and have a .htaccess file with rules).
Now, my solution is to put a .htaccess file in the root folder of the Default website, something like (might need some tweaking):
RewriteEngine on
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!(?:www))([^.]+)\.([^.]+\.[^.]+)$ [NC]
RewriteRule ^([^.]+)?$ http(?%1s)://www.%3/(?1$1) [NC,P,QSA]Now, not forgetting your * DNS A record. What will happen is a user goes to whatever.mydomain.com and it will go to the IIS server, fail to find a match Host Header wise and will instead return the default website ("Under Construction" page), except with that .htaccess file and ISAPI-Rewrite it won't display the "Under Construction" page, as it will run this rule in the .htaccess file and instead pull in the equivalent from www.mydomain.com where more than likely you will have your actual .htaccess file in the root of your www website and where now you can not only specify rules for your www.domain.com but anything.yourdomain.com
Most commonly you'll want something that does http://username.mydomain.com to pull in data from www.mydomain.com/users.php?user=username for example.
If you don't have a .htaccess file with rules, then you'll just get your www.mydomain.com website but as subdomain.mydomain.com instead.
Of course if you own the server (VPS or dedicated) you can tweak this "main" rule even more, but that was a generic one I hope shared hosting IIS companies could incorporate. Perhaps with a tagline of "Dynamic Subdomains".
Thursday, July 9, 2009 12:06 PM -
User-707569433 posted
I'm now using this rule:
RewriteEngine on
# subdomains subdomain.domain.com to www.domain.com for futher processing
RewriteCond %{HTTPS} (on)?
RewriteCond %{HTTP_HOST} ^(?!www\.)[^.]+\.([^.]+\.[^.]{2,3}(?:\.[^.]{2,3})?)$ [NC]
RewriteRule (.*) http(?%1s)://www.%2/$1 [P,NC,QSA]
and I'm using $_SERVER['HTTP_X_FORWARDED_HOST'] in my php page, which returns subdomain.mydomain.com you can of course then trim this down to just subdomain for use in your code.
I'm waiting on my host to apply it to a .htaccess file in the Default Website.
Tuesday, July 21, 2009 10:53 AM -
User-1035923649 posted
I just wanted to add my support for this feature as well. It is going to become a larger and larger issue as more sites offer increased personalization options. Many, if not most, of the DNS providers allow for easy DNS wild cards. It is a shame that you then get stuck with hacks on the IIS side.
Fortunately I only have one site that requires wild card sub-domains so far, so I'm good for now. However, I fear the second site that needs this is only a couple months away so I'll need a new solution very soon.
Monday, October 5, 2009 12:39 PM -
User-908128995 posted
agreed, we need this really bad. a lot of confusion in here about what is really being requested, but specifically need to be able to configure a single site (and NOT the default site) to accept wildcards. I see no valid reason this should be difficult to implement, and would be a huge benefit. I honestly can't believe it's not in there already
Thursday, October 14, 2010 3:19 PM -
User868240991 posted
Just replying to give my support for this issue.Saturday, February 19, 2011 10:38 AM -
User1992311165 posted
I could do it by other mean and not using IIS setting or configuration as it does not allow doing so. In order to do apply below setting, you must have dedicated server or VPS.Basically if you have hosted yourdomain.com on VPS/dedicated server and you would like to offer your customers to have their own sub domain to access the application than you can follow below steps.
When you type www.yourdomain.com it will work fine without any issue. It will call index.html file that is placed in root directly of yourdomain.com. Say you have keep physical directly name as "dir" on hard drive of VPS or dedicated server. And there is index.html file in it. So when you open www.yourdomain.com, it will open www.yourdomain.com/index.html
But when you open XYZ.yourdomain.com or abc.yourdomain.com, it actually open under construction page of IIS (by default "issstart.htm" in "wwwroot"). It call default page set for IIS and not for your domain name. This is real problem. And we can correct it by below way.
What you can do is, you can write below line in "issstart.htm" (It is in "wwwroot" folder) just after tag. <META HTTP-EQUIV=REFRESH CONTENT="1; URL=dir">
And it will solve the issue. Now all your customers whoever type their own domain names like, Abc.yourdomain.com or xyz.yourdomain.com will be redirected to "abc.yourdomain.com/dir" and "xyz.yourdomain.com/dir" respectively. I know that it append "dir" at last but can’t help it. That is why I suggest keeping physical directory name responsible for your web site as short as possible. Alternatively you can hide it using URL rewriting if you wish.
Hope this will help.
P.S. Since we are modifying default file of IIS, so this solution can be used when you offer sub domain to your customer for your single site hosted on VPS and dedicated server and not more ?
Thursday, March 17, 2011 10:37 AM -
User226782385 posted
I want wildcard subdomains, which is not currently possible. I have heard all kind of arguments, all terrible.
@Net_Srak,
I've read this entire thread, and I agree. The "solutions" are no longer acceptable, as IIS continues to lag behind Apache in this regard. +1 for wildcard subdomains being an executive priority in IIS8.
Thanks,
-Aaron NeffFriday, March 18, 2011 9:07 PM -
User521890537 posted
I've read this entire thread, and I agree. The "solutions" are no longer acceptable, as IIS continues to lag behind Apache in this regard.
You can get away with a dedicated IP. That's the only option for now.
Monday, March 21, 2011 10:42 PM -
User-887440794 posted
I am another user who would like to see this simple feature prioritized for the next release. The company I work for provides customer portals for ~15 million people spread across ~700 companies. Each company that receives a portal does so through one of multiple resellers. Each reseller may have their own domain and the resold companies get a sub-domain under their reseller's domain name (e.g. company.resellerdomain.com). It would greatly simplify the administration of our web servers to be able to add a single host entry for each reseller domain (e.g. *.resellerdomain.com) as we are currently adding around 40 to 50 companies per month. This one feature could save us over $1000 in labor per year and more importantly make the lives of a small team of people that much sweeter. I could not find a MS Product Feedback directory dedicated to IIS but I'll keep looking around for a place to make a formal feature request. Sincerely, GaryMonday, June 6, 2011 12:30 PM -
User989702501 posted
This is fine, the product team is reading this I'm sure.
Heck, relate to this, I haven't seen or heard any insider details about IIS 8..... that's sad :)
Monday, June 6, 2011 9:54 PM -
User1275014456 posted
I'm totaly agree with you Net_Srak I dont understand why we do choose work around for this must to have feature on IIS .. i'm not doing realy complex web server scenario .. but with my little scenario I need this feature!! Why this is not exist ... I just want that all my host coming from the domain group4u.ca point to the same WebSite. I have to create each binding for all host is very frustrating! .. And I dont want to knock my head for found a work around for this .. is ridiculous!
+ 10000 for this feature
Thank you.
Sunday, June 12, 2011 8:17 PM -
User1073881637 posted
I must be missing the obvious requirement for this. In my years of hosting on IIS, the need for hasn't came up. I've done my administration in DNS with wildcard entries. Can some provide their use case for this feature. Is this type of feature used in bulk hosting?Sunday, June 12, 2011 10:00 PM -
User-908128995 posted
Scott, wildcards work for mapping all the subdomains of a domain to a single IP. Then, on the server, if you have a website that is exclusively mapped to this matching IP, everything works fine. The problem comes in when you need *.domain.com AND domain2.com ... and maybe several other sites... to all use that same IP.
You don't have to be a large host to do this- if you have a single hosting account with just one IP, and you have more than one TLD, and you want to do something where subdomains are dynamically used on a site, you are stuck. I'm currently stuck with this myself, and wound up dedicating an extra IP for a single site, which I'd prefer not to have to do. What I'd rather be able to do is configure a site on IIS to be mapped to *.domain.com, regardless of the ip.. etc.
Hope that made sense.
Sunday, June 12, 2011 10:15 PM -
User1073881637 posted
I'm still not getting it. If you created a wildcard DNS entry mapped to the single IP and mapped IIS to that specific IP. You'll have to use something like isapi rewrite or url rewrite to do your magic with sub-domains. If you have other domains wanting to map this domain to the same IP, you do the same. That seems to meet the requirement, unless I'm wrong. Which wouldn't surprise me.
What is prohibiting you from implementing this type of architecture? 1 single ip (no host headers) and wildcard DNS? If you wanted all domains to a single site, then use the port 80 wildcard then it doesn't matter. So in the scenerio of dedicated hosting, that would work, in a shared hosting module, you normally only get a single ip (at the hosts I've been involved with at least). :)
Sunday, June 12, 2011 10:39 PM -
User1275014456 posted
I think this solution can work for me .. but the only thing I dont like is that if I config my DNS with Wildcard .. and if my DNS provider support that .. (I will check it) And If I use I Wildcard like that in my DNS : *.exemple.com point to 128.128.128.128 ... all subdomain will point to my WebSite .. even if in reality the subdomain doesn't exist. But, with Wildcard at the webserver level .. I can create a A record with an API from my DNS provider.. and my Webserver will be accept all subdomain *.exemple.com .. So, host that not exist will be return with a 404 not found.. I know I can twick it for reproduce the same with your solution .. but for me I think IIS must to support this feature for other scenario and to be more flexible at this level. Sorry my english suck I litte bit.. Ju.Sunday, June 12, 2011 10:53 PM -
User-908128995 posted
Steve, the only shortcoming with that solution is that it forces you to dedicate an IP to a single website. So, if I have 5 websites that all want to use unlimited subdomains, I'll have to use 5 ips. Sure it works, but why waste IP's when IIS could add wildcard host header handling and let you do all this with just 1 IP (or at least give you the option)
and again - this is already a problem for me. I build lots of web apps, and many of them use a large number of subdomains.
Sunday, June 12, 2011 11:10 PM -
User1073881637 posted
Thanks for the use case, this to me sounds like bulk shared hosting where many accounts go on the same server and share the same IP address. I think GoDaddy does this for one. When someone mentions "wildcard" or lots of sub-domains, are you creating an CNAME record back to the host record for each sub-domain you want to support? Or are you creating a wildcard DNS entry? When someone tells me "wildcard" domains, that means "whatever" domain name is supported. There still have to be some redirect logic within the application to support all these sub-domains people are using. Does that sound accurate?
Monday, June 13, 2011 3:48 AM -
User1073881637 posted
Forgot to mention, I do understand 5 separate accounts, you can't bind "just" the ip address to five separate top level sites in IIS. So yes, you are burning 5 IP addresses. Wonder if ARR would help in a case like this, accept all domains on one and redirect to a content server on the back end? Might be worth asking in the ARR forum.Monday, June 13, 2011 3:51 AM -
User-908128995 posted
Steve, I've already explained that it isn't just bulk hosting, any custom app that wants to use subdomains needs this, as is my case. yes I use dns wildcards, and yes the application uses logic to decide what to do based one which subdomain is used.Monday, June 13, 2011 10:50 AM -
User-707569433 posted
I'm in a similiar situation to setri, and I'm also puzzled why this feature is not in IIS yet.
Like setiri, I've looked at ways around it, but they're just too costly (dedicating IPs), and forces me to use alternative web servers.
Monday, June 20, 2011 6:45 AM -
User989702501 posted
Let's hope this will be in IIS 8 :)Tuesday, June 21, 2011 12:24 AM -
User-716273743 posted
I would like to add my support for this feature. I was very surprised when I could not do it because it just seems intuitive.
I think there is some confusion surrounding this feature. This has nothing to do with DNS. Basically, when we go into IIS and create a new "website" we should be able to enter *.example.com as a host name, period. When IIS loads the website, I can then use ASP.NET to parse the subdomain and authenticate/provide dynamic content based on the subdomain provided. Right now my temporary solution is to have 50 different "websites" for each subdomain all pointed to the same directory using the same application pool. It works fine for now but it will not scale. I know I can come up with a temporary hack using third party tools, but I would rather not unless absolutely necessary.Wednesday, October 5, 2011 12:06 PM -
User989702501 posted
Well, before browser is going to hit your server, it needs to know where as in its IP address first, before your asp.net app is able to get the request and parse which 'subdomain' to go. As of now IIS 7.5 still can't accept * as part of host header value.
There are two parts we talking here:a) host name resolution - DNS part where * is point -> target server IP
b) wildcard host header - IIS part where IIS is able to pick up * as part of the host header value in each website binding info
Friday, October 7, 2011 2:32 AM -
User1073881637 posted
I understand now the limitation why this feature isn't available. As the internet migrates towards IPV6, scarcity of ip's should disappear, would you agree?Sunday, October 9, 2011 6:29 PM -
User-908128995 posted
Steve - It would help a little, but that's not a solution.
This is an easy thing for IIS to add, and it should have been there from the start. Ridiculous that it is missing.
(Edit) It's not just an easy thing to add, the plumbing is already there for host header redirection. So just adding a simple wildcard handler, or even a checkbox on a domain "All Subdomains" or similar, when a host entry is made for a website. It would literally cost nothing to add this feature, and yet it continues to go missing.
Sunday, October 9, 2011 6:33 PM -
User1073881637 posted
I'll let the IIS team indicate if "it's easy to add". I'm looking from a solution perspective, a dns wildcard entry is a solution to map "any" domain name resolves 1/2 have of the issue. The other limitation IIS can't tie to a single ip address with wildcard with a single ip address on the box. I've not been involved where ips are a limitation (except customers not willing to pay for it). Adding an ip address is a workaround, I will agree with that. It's an acceptable workaround IMO.Sunday, October 9, 2011 7:35 PM -
User-908128995 posted
I'm done discussing this. By your logic, host header redirects are unecessary too (just throw another IP at the problem). I just hope the IIS team doesn't see it your way.
*NOT* an acceptable workaround.
Sincerely,
The guy who pays for Windows hosting that doesn't do what he needs it to.
Sunday, October 9, 2011 7:45 PM -
User1073881637 posted
That is fine, I don't profess to know everything, I'm just trying to understand all angles. For my own knowledge, when someone mentions host-header redirects, are they using a 3rd party redirect or URL Rewrite to handle the redirects? I'm sure the IIS team understands this feature and benefits much better than me.Sunday, October 9, 2011 8:21 PM -
User989702501 posted
@@ I doubt this will be in IIS 8 as well. so just pray and wait.Monday, October 10, 2011 3:55 AM -
User856267603 posted
Dear IIS team, please consider wildcard entrys as HostHeaders a top priority for the future.
I'm working for a hoster and oh I don't know how many times we've cursed this damn IIS that it does not support it.
Everyone that tells it's not needed, has obviously never ever worked with apache. it just plain sucks to add a number of hostheaders when one wildcard entry would suffice. It bloats of the config, hinders the visibility and just ends up in more work to configure it.
btw. the ipv6 argument as a counter to the ip space waste is invalid, as for the next 10 years it will not be feasibly to setup professional services with ipv6 only.
No customer will pay you anything if only 99% of all users can access it. (and i doubt that even in 10 years there will be that many users with a working ipv6 access)
Wednesday, October 26, 2011 5:42 AM -
User-1922891820 posted
Just want to add my support for this issue. It is a very important feature whic should be really easy to add. I'll even help you out:
public Site GetSite(string hostName)
{
hostName = hostName.Replace(hostName.Split(".").First() + ".","");
foreach(var s in GetAllSites())
{
if(s.HostName.Replace("*.","") == (hostName))
return s;
}
}Monday, November 7, 2011 6:37 AM -
User688967293 posted
I'd also like to request the IIS team add support for this. I had assumed this feature already existed and was surprised when it didn't work. I honestly came here looking for the correct syntax as I thought I must have had it wrong. I'm pretty shocked this feature is missing to be honest.
It's also pretty surprising that people come here to argue against adding such a basic feature. It can only make the software better to add it. There's many features in IIS that I don't use, but I wouldn't say they shouldn't be there for that reason. Go ahead, let them add the feature and if you don't see a case where you'd use it then just don't! Yeah, we all know there's third party ways to accomplish such tasks, but in that regard most of the features in Windows itself are unnecessary.
Common IIS team, obviously there's enough interest in this feature to spend the few minutes adding it!
Wednesday, February 1, 2012 1:47 PM -
User1905195304 posted
+1 to please add it i have a web app.. domain.org i want to configure the app to be able to check what sub domain was used.. if that sub domain was used then show its contents. at the moment im having to add bindings to all the "possible" options.. double work.. log into the apps admin. add the sub domains details.. then remote desktop to the server right click add a binding to the site "yetanothersubdomain.domain.org" woulda been easier just adding a binding of " *.domain.org" and let the app take care of the rest never mind development :P have to keep adding host file linksThursday, February 2, 2012 4:10 AM -
User-908128995 posted
I've added a feature request for this here: https://connect.microsoft.com/WindowsServerFeedback/feedback/details/722874/wildcard-subdomain-hostheader-support-in-iis-7-5 I should have filed it as a bug report, since any modern webserver should not be lacking this feature. But, I'm sure MS will ignore this just like the other few things I've yelled about over the years - Nullable Datasets, domains with trailing dots, etc. Trust that I'm not just venting when I say this lock-in has seriously made me consider switching platforms, and I still may.Friday, February 3, 2012 1:44 AM -
User-1664798565 posted
+1 for this!!Thursday, February 23, 2012 12:13 PM -
User-1461407989 posted
I'll add my 2 cents. MCSE since 1997, I've never needed this before and so hadn't thought about it. Have used wildcard DNS entries for years, always had spare IPs to handle them (often I like to let users create their own name and I've always preferred "mysite.acme.com" to "www.acme.com/mysite").
So, for those still not getting this: Assume I run two separate CMS solutions, "acme.com" and "hostme.com". Both allow the "mysite" scenario above. Both are low volume, and I'm hosting them on a service that's given me ONE outside IP address "9.0.0.1". These are boutique services and my little shared server is more than adequate to the task.
DNS: *.acme.com > 9.0.0.1 DNS: *.hostme.com > 9.0.0.1
IIS binding for site "acme CMS": 9.0.0.1, host header "*.acme.com" IIS binding for site "hostme CMS": 9.0.0.1, host header "*.hostme.com"
In my code, I detect the * portion of the incoming header and hit the database accordingly.
Except...IIS won't do this.
Surprised I've never needed this before, astonished that IIS chokes on it. The error message I get when I enter "*.acme.com" as a host header looks like something from the dark ages.
I can conceive of a 3rd site, sitting next to these two, bound to the external IP with no host headers, and with reverse proxy set up (IIS 7.5, URL Rewrite 2.0 and ARR), and using ports 8080 for "acme CMS" with no host headers, and port 8181 for "hostme CMS" also with no host headers. Yeah, that would work. But it's 2012 and it's silly that I can't type a wildcard into the host header, especially in IIS 7.5, since the re-architecture made URL Rewrite and ARR so easy.
Bottom line: I'm lazy, and so apparently is the IIS team. But I'm the customer so I get to be lazy. :)
Sunday, April 22, 2012 3:16 AM -
User-15302958 posted
devconcept, you hit the nail on the head. +1 of what that person said.
Thursday, June 7, 2012 12:26 PM -
User-908128995 posted
Agreed, except that you're not lazy.. this feature is actually necessary in particular cases, so it's just MS that is, in this case ;)Friday, June 8, 2012 11:05 AM -
User1073881637 posted
This thread just won't die. :)Saturday, June 9, 2012 11:34 PM -
User-908128995 posted
it shouldnt.
Saturday, June 9, 2012 11:36 PM -
User1073881637 posted
I'm afraid we won't see this module within IIS 8 either. It'll have to be an out of band or potentially wait until the next release of IIS.Sunday, June 10, 2012 6:22 AM -
User989702501 posted
It is a hot request since many years ago :)
Thursday, June 21, 2012 8:28 PM -
User12990426 posted
I'm afraid we won't see this module within IIS 8 either. It'll have to be an out of band or potentially wait until the next release of IIS.I can't believe we won´t get this feature in the next version of IIS. I'm speaking for myself and a bunch of colleagues. We've been needing this feature for YEARS, we still need it, and we need it BAD!
And what I can't believe either is the big fuzz about it. *.example.com? Is it really that hard?
And one more thing, we'll continue nagging for it ...
Wednesday, September 12, 2012 10:40 AM -
User989702501 posted
+1 since many years ago.Sunday, September 16, 2012 11:22 PM -
User2035086278 posted
I agree, it's absolutely ludicrous that this isn't supported in IIS. I have had 2 separate instances where this has been required, and they aren't particularly advanced scenarios either... I can't understand for the life of me why such a simple feature has been ignored for so long!
One usage scenario is simply for Wordpress multisite... Wildcard DNS entries are made and users can sign up for their own subdomain. Very simple scenario that is quite common and is relied on by many services today.
The second usage scenario that I'm trying to sort out now is to create a very simple scrip that grabs the request URI and then makes an HTTP redirect to another subdomain... For instance going from subdomain.example.com to subdomain.example2.com. A simple mapping script that should take 3 lines of code on an Apache server is quite literally IMPOSSIBLE to implement on an IIS box without having to use up an entire IPv4 address. How is that even possible? How is that an acceptable solution? I mean, it's 2012, we are running out of addresses, they should be rationed and yet, the IIS team thinks that I should consume an entire address just to perform a simple redirect?
Absolutely and totally ridiculous.
Tuesday, November 6, 2012 3:19 PM -
User989702501 posted
You've got my support for this.
Per info I got, IIS product group is aware of this, it is not a tech issue and the team is pushing for it.Sunday, November 11, 2012 11:06 PM -
User-1461407989 posted
This issue is resolved in IIS8, so go grab that 2012 update... :)Wednesday, November 14, 2012 2:04 PM -
User989702501 posted
huh? mind to share more info or link? afaik - this is not in 2012 or IIS8
Friday, November 16, 2012 2:34 AM -
User-2064283741 posted
I have never heard of this either and realise the need for it. Infact I would have prefered it to the other improvements.
I haven't used IIS8 enough but not noticed any feature like this and I would have thought it would be announced.
Friday, November 16, 2012 6:58 AM -
User226782385 posted
Amazon EC2 w/o VPC supports *only* 1 public IP. Two issues:
1) What if one site needs an SSL cert and one doesn't?
2) What if each site needs its own (non-shared) SSL cert?Does IIS8 offer a solution yet?
Thanks,
-Aaron NeffWednesday, November 21, 2012 2:57 AM -
User-2064283741 posted
SSL is seperate case and not related to this thread - which is about wildcards for hostheaders unsupported in IIS.
SSL is based on the IP address. If you need muiltiple sites with different SSLs you need multiple IPs.
The issue is with Amazons EC2 policy/package.
Wednesday, November 21, 2012 8:39 AM -
User226782385 posted
@Rovastar, You're right - forgot about the host header being encrypted. Pls disregard. Thanks, -Aaron
Wednesday, November 21, 2012 12:57 PM -
User-331012720 posted
I was struggling since last 2 hours & finally what I got.
"IIS doesn't provide this feature".
One more thing, when I tried to enter *.mysite.com in website binding section, I got a message:
The host name must be a valid host name format & cannot contain the following characters:
/\[]:|<>+=;,?$%#@{ }^".
But MS haven't denied for ( * ). I haven't enter any of above character, But IIS says that I have entered invalid string value.
--
Anuj Rathi
Saturday, December 29, 2012 11:47 AM -
User989702501 posted
what are you trying to do ? have replied in the other thread on nornal host header setup.
if you need wildcard domain for IIS - say *.yourdomain.com then this is not so much of IIS, as you have tested it can't support * as part of the host header. All you need is to bind the site without any host header value - just dedicated IP and port. then create a DNS record * and point to the IP. this is more of name resolution - where it gets * all name request and resolve it to your dedicated IP, so when the request reaches IIS, since there is no host header setup, all requests will be handle by that particular website.
Tuesday, January 1, 2013 8:20 PM -
User856267603 posted
Oh boy, I really can't believe that this feature still hasn't made it into IIS....
@qbernard
the "solution" with the empty HostHeader is no more than a crude workaround, that wastes IP addresses and creates additional adminitrative overhead on the DNS level. (as well as networking, firewall, etc. - if you really take into account what it means to provide additional IP addresses for servers)
Friday, January 4, 2013 5:26 AM -
User989702501 posted
@@ Yes it is, i'm just addressing OP for his needs in his setup.
This feature is NOT in IIS yet, this feature should be available since IIS 6 :)
Monday, January 7, 2013 8:57 PM -
User856267603 posted
holy camoly, this feature finally made it's debut in IIS with Windows 10
Ok, it only supports wilcards in the host part of an URI and not for domain or tld, but at least it's a beginning.
Friday, October 3, 2014 7:16 AM -
User-585237192 posted
I can't understand why it's been so much trouble! It's just a simple string match, why not just enable regex on the check!!!
I agree this should have been in from the beginning, a Microsoft tech saying use Apache isn't an acceptable answer either!Thursday, March 5, 2015 8:14 PM -
User-1981574355 posted
Wildcard subdomains are needed. People misspell www all the time (seriously) and these people will get 403 errors and think that the site is down. Others fail to put www into the address at all. It would not be too hard for IIS to order by TLD, and then each domain and then to search subdomains, and if there is no exact match, then test wildcards.
Something else that would be helpful is a "This site answers all host headers not otherwise specified" type of request. This would be a default web site. I consider this a vital thing that is missing, and the end result is a high number of 403 responses to slightly misspelled URLs.
Thursday, July 9, 2015 2:16 PM -
User-2064283741 posted
Yeah we all want it but it does not like it will be done.
There are workarounds.
I use separate IPs for wildcard sites and bind to the IP not host headers.Tuesday, July 14, 2015 10:33 AM -
User-1939905867 posted
When I look at this on Windows Server 2016 Technical Preview 2, I can finally add a wildcard hostname:
Name ID State Physical Path Bindings ---- -- ----- ------------- -------- Default Web Site 1 Started %SystemDrive%\inetpub\wwwroot http *:80:*.bar.local
and it seems to work.
And I thought there was nothing new in IIS 10 except for HTTP/2 support.
Tuesday, July 14, 2015 12:36 PM -
User-2064283741 posted
Well that does sound good news. Not used the new Windows server beta yet.
Microsofts iis team (if any are left that are not moved to azure) are doing a poor job giving any information of the features.Tuesday, July 14, 2015 1:01 PM -
User2035086278 posted
This is great news! Downloading the technical preview now. This will make a huge difference for simplifying sites with multiple subdomains and SEO redirects.
Tuesday, July 14, 2015 1:06 PM -
User-1939905867 posted
@Rovastar - I just started a blog post about new features in IIS 10, there are not many:
Tuesday, July 14, 2015 2:43 PM -
User-2064283741 posted
Nice one. With little official news this is a useful resource.
Tuesday, July 14, 2015 3:02 PM