Wildcard Host Name Handling

Discussion in 'General troubleshooting' started by Roverman, May 13, 2013.

  1. I am attempting to present different content from my site based on the host name the user is using to browse my site. For example, http://friends.mysite.com would resolve to the same site as http://enemies.mysite.com. My code reads the host name and dynamically changes the content based on "friends" or "enemies".

    I have my DNS setup correctly with an "A" record of *.mysite.com. Ping is properly resolving the same IP no matter what I enter as *. DNS looks good.

    However, when browsing, you are presented with the "Web Page is Unavailable" error page is you don't use "www". I need this to be dynamic and not require I manually create new "A" records in DNS for every possible host name that will be used.

    Somehow, I managed one host name that is properly handled without an "A" record or CNAME. And I can't remember how I did it.

    Can anyone get me back on track?
     
  2. Elshadriel

    Elshadriel Winhost Staff

    In order to do this, you would have to order SSL for your site account which will provide you with a Unique IP and creates an "A" record for *.mysite.com and adds the necessary host header entry in IIS.
     
  3. What I can't recall is how I managed to get it to work for "test.mysite.com" (which has no CNAME or A record) but not for others.

    I have two sites and use one for beta/staging and the other for prod. I have SSL for prod. I'd like to make sure it works before I push the rest of my code to prod without some testing and support documentation.
     
  4. Elshadriel

    Elshadriel Winhost Staff

Share This Page