« Previous Next »

Thread: Wildcard host header support

Last post 10-05-2009 12:39 PM by TCost. 19 replies.

Average Rating Rate It (5)

RSS

Page 1 of 2 (20 items) 1 2 Next >

Sort Posts:

  • 04-05-2007, 1:24 PM

    • Net_Srak
    • Not Ranked
    • Joined on 04-05-2007, 5:23 PM
    • Posts 5

    Wildcard host header support

    I want wildcard subdomains, which is not currently possible. I have heard all kind of arguments, all terrible.

    -          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.

    -          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.

  • 04-05-2007, 2:07 PM In reply to

    • sethi2000
    • Not Ranked
    • Joined on 06-08-2006, 9:00 PM
    • London
    • Posts 5

    Re: Wildcard host header support

    Net_Srak:

    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" 


  • 04-05-2007, 3:46 PM In reply to

    • Net_Srak
    • Not Ranked
    • Joined on 04-05-2007, 5:23 PM
    • Posts 5

    Re: Wildcard host header support

    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).
     

  • 04-06-2007, 12:43 AM In reply to

    Re: Wildcard host header support

    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.

    Cheers,
    Bernard Cheah
  • 04-06-2007, 4:58 AM In reply to

    Re: Wildcard host header support

    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. 

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 04-06-2007, 5:44 PM In reply to

    • Net_Srak
    • Not Ranked
    • Joined on 04-05-2007, 5:23 PM
    • Posts 5

    Re: Wildcard host header support

    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!
  • 04-07-2007, 12:38 AM In reply to

    Re: Wildcard host header support

    Mmm.... pray hard then.
    If this is in spec, MS should and will do it.
    If it's not... then pray again.

    Cheers,
    Bernard Cheah
  • 04-07-2007, 11:59 AM In reply to

    • Net_Srak
    • Not Ranked
    • Joined on 04-05-2007, 5:23 PM
    • Posts 5

    Re: Wildcard host header support

    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.
     

  • 04-08-2007, 11:39 PM In reply to

    Re: Wildcard host header support

    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.
    Cheers,
    Bernard Cheah
  • 04-09-2007, 1:46 PM In reply to

    • Net_Srak
    • Not Ranked
    • Joined on 04-05-2007, 5:23 PM
    • Posts 5

    Re: Wildcard host header support

    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.

  • 04-11-2007, 5:24 AM In reply to

    Re: Wildcard host header support

    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.
    Cheers,
    Bernard Cheah
  • 04-12-2007, 2:00 AM In reply to

    • thomad
    • Top 25 Contributor
    • Joined on 08-20-2002, 11:28 AM
    • Redmond
    • Posts 503

    Re: Wildcard host header support

    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,

     

     

    Thomas Deml
    Program Manager
    Internet Information Services
    Microsoft Corp.
  • 09-29-2007, 5:07 AM In reply to

    • ooswald
    • Not Ranked
    • Joined on 09-29-2007, 8:59 AM
    • Posts 1

    Re: Wildcard host header support

    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.

  • 09-29-2007, 9:46 AM In reply to

    Re: Wildcard host header support

    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.   

    Steve Schofield
    Windows Server MVP - IIS
    http://weblogs.asp.net/steveschofield


    http://www.IISLogs.com
    Log archival solution
    Install, Configure, Forget
  • 10-01-2007, 2:46 AM In reply to

    Re: Wildcard host header support

    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

     


     

    Articles and news on ASP/ASP.NET
    ASPCode.net
Page 1 of 2 (20 items) 1 2 Next >
Microsoft Communities