Multiple domains (with & without www prefix) on same server, running the same codeSetting DNS for a Virtual Host on Same IPSSL,IIS: One website for multiple sub-domains and one website for the top-level domain (with or without www.))Setting Up Multiple Domains (plus wildcard subdomains) to Point to the Same Site/VirtualHostConfiguring DNS and IIS for multiple domains on a single serverMany domains/sites hosted on same server, CNAME alternatives to avoid writing same IP in DNS?Foward mail to different domains using Postfix - all domains hosted on same server - external email hostingHow can I mitigate DNS Server outages?My AD domain and DNS domain names are the same. Can this be resolved with SRV secords?How to set the Ipv6 vor a domain without subdomainNot able to retrive cookies in Subdomain

Need to understand my home electrical meter to see why bill is so high and/or if neighbor is on same meter

Value of a binomial series

Is "cool" appropriate or offensive to use in IMs?

I know that there is a preselected candidate for a position to be filled at my department. What should I do?

A steel cutting sword?

Using credit/debit card details vs swiping a card in a payment (credit card) terminal

Where's this lookout in Nova Scotia?

Why were helmets and other body armour not commonplace in the 1800s?

Does pair production happen even when the photon is around a neutron?

My players want to grind XP but we're using milestone advancement

How to let other coworkers know that I don't share my coworker's political views?

What is a fully qualified name?

Should one buy new hardware after a system compromise?

Is it rude to call a professor by their last name with no prefix in a non-academic setting?

Parallel fifths in the orchestra

What is the difference between singing and speaking?

Compaq Portable vs IBM 5155 Portable PC

Is it truly impossible to tell what a CPU is doing?

What is a Power on Reset IC?

Is it legal to meet with potential future employers in the UK, whilst visiting from the USA

Why do Russians almost not use verbs of possession akin to "have"?

What was the idiom for something that we take without a doubt?

Does this strict reading of the rules allow both Extra Attack and the Thirsting Blade warlock invocation to be used together?

Which European Languages are not Indo-European?



Multiple domains (with & without www prefix) on same server, running the same code


Setting DNS for a Virtual Host on Same IPSSL,IIS: One website for multiple sub-domains and one website for the top-level domain (with or without www.))Setting Up Multiple Domains (plus wildcard subdomains) to Point to the Same Site/VirtualHostConfiguring DNS and IIS for multiple domains on a single serverMany domains/sites hosted on same server, CNAME alternatives to avoid writing same IP in DNS?Foward mail to different domains using Postfix - all domains hosted on same server - external email hostingHow can I mitigate DNS Server outages?My AD domain and DNS domain names are the same. Can this be resolved with SRV secords?How to set the Ipv6 vor a domain without subdomainNot able to retrive cookies in Subdomain






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








3















We've inherited the following website setup:



  1. one main website and around 130 secondary websites, which all point to the main website domain (through a CNAME DNS setup);

  2. Website is hosted on an IIS 6 server;

  3. The code is the same for all websites;

  4. The 130 secondary websites display almost the same content as the main website, with some unique differences, specific to each domain;

  5. The content is served based on the domain name. I mean, the backed reads the browser's web address and serves content accordingly.

The issue



Currently the 130 web domains don't work without www.



Attempted solution



Setting each of the 130 domains DNS with an A Name pointing to the IP address of the main website didn't work. This results in lost of the original domain, therefore the main website is served.



Question



Is a purely DNS setup solution possible?



Is there a straight forward solution that doesn't require 131 versions of the same code and 131 different IP addresses?



I'm primarily a front end developer, all of this DNS/server setup is a bit out of my comfort zone so apologies if some of this description makes no sense and please let me know if you require further info. Thank you kindly in advance.



For the record (ah!), these are the DNS records allowed by our provider Star:



  1. A

  2. AAAA

  3. CNAME

  4. MX

  5. NS

  6. TXT

  7. SPF

  8. SRV









share|improve this question
























  • @zulkarnaen & 14theories the DNS provider is Star

    – user257991
    Dec 10 '14 at 9:52


















3















We've inherited the following website setup:



  1. one main website and around 130 secondary websites, which all point to the main website domain (through a CNAME DNS setup);

  2. Website is hosted on an IIS 6 server;

  3. The code is the same for all websites;

  4. The 130 secondary websites display almost the same content as the main website, with some unique differences, specific to each domain;

  5. The content is served based on the domain name. I mean, the backed reads the browser's web address and serves content accordingly.

The issue



Currently the 130 web domains don't work without www.



Attempted solution



Setting each of the 130 domains DNS with an A Name pointing to the IP address of the main website didn't work. This results in lost of the original domain, therefore the main website is served.



Question



Is a purely DNS setup solution possible?



Is there a straight forward solution that doesn't require 131 versions of the same code and 131 different IP addresses?



I'm primarily a front end developer, all of this DNS/server setup is a bit out of my comfort zone so apologies if some of this description makes no sense and please let me know if you require further info. Thank you kindly in advance.



For the record (ah!), these are the DNS records allowed by our provider Star:



  1. A

  2. AAAA

  3. CNAME

  4. MX

  5. NS

  6. TXT

  7. SPF

  8. SRV









share|improve this question
























  • @zulkarnaen & 14theories the DNS provider is Star

    – user257991
    Dec 10 '14 at 9:52














3












3








3


1






We've inherited the following website setup:



  1. one main website and around 130 secondary websites, which all point to the main website domain (through a CNAME DNS setup);

  2. Website is hosted on an IIS 6 server;

  3. The code is the same for all websites;

  4. The 130 secondary websites display almost the same content as the main website, with some unique differences, specific to each domain;

  5. The content is served based on the domain name. I mean, the backed reads the browser's web address and serves content accordingly.

The issue



Currently the 130 web domains don't work without www.



Attempted solution



Setting each of the 130 domains DNS with an A Name pointing to the IP address of the main website didn't work. This results in lost of the original domain, therefore the main website is served.



Question



Is a purely DNS setup solution possible?



Is there a straight forward solution that doesn't require 131 versions of the same code and 131 different IP addresses?



I'm primarily a front end developer, all of this DNS/server setup is a bit out of my comfort zone so apologies if some of this description makes no sense and please let me know if you require further info. Thank you kindly in advance.



For the record (ah!), these are the DNS records allowed by our provider Star:



  1. A

  2. AAAA

  3. CNAME

  4. MX

  5. NS

  6. TXT

  7. SPF

  8. SRV









share|improve this question
















We've inherited the following website setup:



  1. one main website and around 130 secondary websites, which all point to the main website domain (through a CNAME DNS setup);

  2. Website is hosted on an IIS 6 server;

  3. The code is the same for all websites;

  4. The 130 secondary websites display almost the same content as the main website, with some unique differences, specific to each domain;

  5. The content is served based on the domain name. I mean, the backed reads the browser's web address and serves content accordingly.

The issue



Currently the 130 web domains don't work without www.



Attempted solution



Setting each of the 130 domains DNS with an A Name pointing to the IP address of the main website didn't work. This results in lost of the original domain, therefore the main website is served.



Question



Is a purely DNS setup solution possible?



Is there a straight forward solution that doesn't require 131 versions of the same code and 131 different IP addresses?



I'm primarily a front end developer, all of this DNS/server setup is a bit out of my comfort zone so apologies if some of this description makes no sense and please let me know if you require further info. Thank you kindly in advance.



For the record (ah!), these are the DNS records allowed by our provider Star:



  1. A

  2. AAAA

  3. CNAME

  4. MX

  5. NS

  6. TXT

  7. SPF

  8. SRV






domain-name-system iis domain






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 10 '14 at 12:16









Community

1




1










asked Dec 9 '14 at 14:38









webDevwebDev

162




162












  • @zulkarnaen & 14theories the DNS provider is Star

    – user257991
    Dec 10 '14 at 9:52


















  • @zulkarnaen & 14theories the DNS provider is Star

    – user257991
    Dec 10 '14 at 9:52

















@zulkarnaen & 14theories the DNS provider is Star

– user257991
Dec 10 '14 at 9:52






@zulkarnaen & 14theories the DNS provider is Star

– user257991
Dec 10 '14 at 9:52











4 Answers
4






active

oldest

votes


















0














You need to configure both the DNS and web server. For example, for a "DOMAIN.tld" you need to configured the DNS zone to have both entries:



  • one A record for DOMAIN.tld

  • one A record for www.DOMAIN.tld
    (both pointing to the same IP address)

The web server needs to be configured to contain a (common) virtual web site for both DOMAIN.tld and www.DOMAIN.tld. For Apache HTTPD this means that one is the primary host (DOMAIN.tld) and the other is an alias (www.DOMAIN.tld).






share|improve this answer























  • Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

    – webDev
    Dec 9 '14 at 15:48












  • The OP notes that the web server is IIS, not Apache.

    – BE77Y
    Dec 10 '14 at 12:24











  • The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

    – mteodor
    Dec 11 '14 at 16:54



















0














how about to add new record on the DNS server,



for example your DNS Conf



sample.com A 202.xxx.xxx.xxx
example.com CNAME sample.com
www.example.com CNAME sample.com


hope this help your issue :)






share|improve this answer























  • Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

    – webDev
    Dec 9 '14 at 17:22











  • where you put the dns record?about cname

    – zulkarnaen
    Dec 9 '14 at 21:50


















0














If your DNS provider has functionality to allow for a redirect "record", I think it would be the easiest way to set it up without having to create the aliases on the web server. Using the redirect record, redirect each of the root domains (myexample.com) to the www subdomain (www.myexample.com). Although this is not technically actually a pure DNS setup solution, I believe it will meet your needs as long as your DNS provider does offer this.



Who is your DNS provider?






share|improve this answer






























    0














    I have this working with thousands of hostnames (subdomains). You probably want a wildcard DNS record (*.mydomain.com). You can use a CNAME record that aliases this to the A record for the main domain (even if the main domain matches the wildcard, like www.mydomain.com). The wildcard record will be used for ANY subdomains not explicitly found in other CNAME or A records, even those with multiple subdomains like www.sub1.sub2.mydomain.com. You could have explicit entries for each subdomain, but there is no reason to if they're all being handled by the same web server.



    In IIS, you must bind the site to everything, or to an IP address (the public one, or the DMZ address your firewall forwards the public IP address to). Theoretically, you could bind each subdomains/domain name, but that would be a lot of bindings, and given the number you already have, you're probably adding more on a regular basis, so I would not recommend this.






    share|improve this answer























      Your Answer








      StackExchange.ready(function()
      var channelOptions =
      tags: "".split(" "),
      id: "2"
      ;
      initTagRenderer("".split(" "), "".split(" "), channelOptions);

      StackExchange.using("externalEditor", function()
      // Have to fire editor after snippets, if snippets enabled
      if (StackExchange.settings.snippets.snippetsEnabled)
      StackExchange.using("snippets", function()
      createEditor();
      );

      else
      createEditor();

      );

      function createEditor()
      StackExchange.prepareEditor(
      heartbeatType: 'answer',
      autoActivateHeartbeat: false,
      convertImagesToLinks: true,
      noModals: true,
      showLowRepImageUploadWarning: true,
      reputationToPostImages: 10,
      bindNavPrevention: true,
      postfix: "",
      imageUploader:
      brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
      contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
      allowUrls: true
      ,
      onDemand: true,
      discardSelector: ".discard-answer"
      ,immediatelyShowMarkdownHelp:true
      );



      );













      draft saved

      draft discarded


















      StackExchange.ready(
      function ()
      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f650277%2fmultiple-domains-with-without-www-prefix-on-same-server-running-the-same-co%23new-answer', 'question_page');

      );

      Post as a guest















      Required, but never shown

























      4 Answers
      4






      active

      oldest

      votes








      4 Answers
      4






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      You need to configure both the DNS and web server. For example, for a "DOMAIN.tld" you need to configured the DNS zone to have both entries:



      • one A record for DOMAIN.tld

      • one A record for www.DOMAIN.tld
        (both pointing to the same IP address)

      The web server needs to be configured to contain a (common) virtual web site for both DOMAIN.tld and www.DOMAIN.tld. For Apache HTTPD this means that one is the primary host (DOMAIN.tld) and the other is an alias (www.DOMAIN.tld).






      share|improve this answer























      • Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

        – webDev
        Dec 9 '14 at 15:48












      • The OP notes that the web server is IIS, not Apache.

        – BE77Y
        Dec 10 '14 at 12:24











      • The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

        – mteodor
        Dec 11 '14 at 16:54
















      0














      You need to configure both the DNS and web server. For example, for a "DOMAIN.tld" you need to configured the DNS zone to have both entries:



      • one A record for DOMAIN.tld

      • one A record for www.DOMAIN.tld
        (both pointing to the same IP address)

      The web server needs to be configured to contain a (common) virtual web site for both DOMAIN.tld and www.DOMAIN.tld. For Apache HTTPD this means that one is the primary host (DOMAIN.tld) and the other is an alias (www.DOMAIN.tld).






      share|improve this answer























      • Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

        – webDev
        Dec 9 '14 at 15:48












      • The OP notes that the web server is IIS, not Apache.

        – BE77Y
        Dec 10 '14 at 12:24











      • The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

        – mteodor
        Dec 11 '14 at 16:54














      0












      0








      0







      You need to configure both the DNS and web server. For example, for a "DOMAIN.tld" you need to configured the DNS zone to have both entries:



      • one A record for DOMAIN.tld

      • one A record for www.DOMAIN.tld
        (both pointing to the same IP address)

      The web server needs to be configured to contain a (common) virtual web site for both DOMAIN.tld and www.DOMAIN.tld. For Apache HTTPD this means that one is the primary host (DOMAIN.tld) and the other is an alias (www.DOMAIN.tld).






      share|improve this answer













      You need to configure both the DNS and web server. For example, for a "DOMAIN.tld" you need to configured the DNS zone to have both entries:



      • one A record for DOMAIN.tld

      • one A record for www.DOMAIN.tld
        (both pointing to the same IP address)

      The web server needs to be configured to contain a (common) virtual web site for both DOMAIN.tld and www.DOMAIN.tld. For Apache HTTPD this means that one is the primary host (DOMAIN.tld) and the other is an alias (www.DOMAIN.tld).







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 9 '14 at 15:05









      mteodormteodor

      392




      392












      • Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

        – webDev
        Dec 9 '14 at 15:48












      • The OP notes that the web server is IIS, not Apache.

        – BE77Y
        Dec 10 '14 at 12:24











      • The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

        – mteodor
        Dec 11 '14 at 16:54


















      • Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

        – webDev
        Dec 9 '14 at 15:48












      • The OP notes that the web server is IIS, not Apache.

        – BE77Y
        Dec 10 '14 at 12:24











      • The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

        – mteodor
        Dec 11 '14 at 16:54

















      Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

      – webDev
      Dec 9 '14 at 15:48






      Sorry but your explanation went way over my head. Do you mean that the domains should only contain 2 A records and no CNAME record at all? Do you mean we need to create a virtual website for each of the 130 domains (with and without www) manually? (We're using Microsoft's IIS 6 so I'm not sure how the Apache bit applies in this case.)

      – webDev
      Dec 9 '14 at 15:48














      The OP notes that the web server is IIS, not Apache.

      – BE77Y
      Dec 10 '14 at 12:24





      The OP notes that the web server is IIS, not Apache.

      – BE77Y
      Dec 10 '14 at 12:24













      The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

      – mteodor
      Dec 11 '14 at 16:54






      The problem here is that the root domain (ie. DOMAIN.tld) is a CNAME! Change this to an A record and you will be able to add an CNAME record for www.DOMAIN.tld. After all, it doesn't matter if it is IIS or Apache.

      – mteodor
      Dec 11 '14 at 16:54














      0














      how about to add new record on the DNS server,



      for example your DNS Conf



      sample.com A 202.xxx.xxx.xxx
      example.com CNAME sample.com
      www.example.com CNAME sample.com


      hope this help your issue :)






      share|improve this answer























      • Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

        – webDev
        Dec 9 '14 at 17:22











      • where you put the dns record?about cname

        – zulkarnaen
        Dec 9 '14 at 21:50















      0














      how about to add new record on the DNS server,



      for example your DNS Conf



      sample.com A 202.xxx.xxx.xxx
      example.com CNAME sample.com
      www.example.com CNAME sample.com


      hope this help your issue :)






      share|improve this answer























      • Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

        – webDev
        Dec 9 '14 at 17:22











      • where you put the dns record?about cname

        – zulkarnaen
        Dec 9 '14 at 21:50













      0












      0








      0







      how about to add new record on the DNS server,



      for example your DNS Conf



      sample.com A 202.xxx.xxx.xxx
      example.com CNAME sample.com
      www.example.com CNAME sample.com


      hope this help your issue :)






      share|improve this answer













      how about to add new record on the DNS server,



      for example your DNS Conf



      sample.com A 202.xxx.xxx.xxx
      example.com CNAME sample.com
      www.example.com CNAME sample.com


      hope this help your issue :)







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Dec 9 '14 at 16:42









      zulkarnaenzulkarnaen

      265




      265












      • Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

        – webDev
        Dec 9 '14 at 17:22











      • where you put the dns record?about cname

        – zulkarnaen
        Dec 9 '14 at 21:50

















      • Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

        – webDev
        Dec 9 '14 at 17:22











      • where you put the dns record?about cname

        – zulkarnaen
        Dec 9 '14 at 21:50
















      Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

      – webDev
      Dec 9 '14 at 17:22





      Is this really possible? I tried to add a second CNAME record but it appears to support only one CNAME per domain.

      – webDev
      Dec 9 '14 at 17:22













      where you put the dns record?about cname

      – zulkarnaen
      Dec 9 '14 at 21:50





      where you put the dns record?about cname

      – zulkarnaen
      Dec 9 '14 at 21:50











      0














      If your DNS provider has functionality to allow for a redirect "record", I think it would be the easiest way to set it up without having to create the aliases on the web server. Using the redirect record, redirect each of the root domains (myexample.com) to the www subdomain (www.myexample.com). Although this is not technically actually a pure DNS setup solution, I believe it will meet your needs as long as your DNS provider does offer this.



      Who is your DNS provider?






      share|improve this answer



























        0














        If your DNS provider has functionality to allow for a redirect "record", I think it would be the easiest way to set it up without having to create the aliases on the web server. Using the redirect record, redirect each of the root domains (myexample.com) to the www subdomain (www.myexample.com). Although this is not technically actually a pure DNS setup solution, I believe it will meet your needs as long as your DNS provider does offer this.



        Who is your DNS provider?






        share|improve this answer

























          0












          0








          0







          If your DNS provider has functionality to allow for a redirect "record", I think it would be the easiest way to set it up without having to create the aliases on the web server. Using the redirect record, redirect each of the root domains (myexample.com) to the www subdomain (www.myexample.com). Although this is not technically actually a pure DNS setup solution, I believe it will meet your needs as long as your DNS provider does offer this.



          Who is your DNS provider?






          share|improve this answer













          If your DNS provider has functionality to allow for a redirect "record", I think it would be the easiest way to set it up without having to create the aliases on the web server. Using the redirect record, redirect each of the root domains (myexample.com) to the www subdomain (www.myexample.com). Although this is not technically actually a pure DNS setup solution, I believe it will meet your needs as long as your DNS provider does offer this.



          Who is your DNS provider?







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Dec 10 '14 at 9:30









          14theories14theories

          11




          11





















              0














              I have this working with thousands of hostnames (subdomains). You probably want a wildcard DNS record (*.mydomain.com). You can use a CNAME record that aliases this to the A record for the main domain (even if the main domain matches the wildcard, like www.mydomain.com). The wildcard record will be used for ANY subdomains not explicitly found in other CNAME or A records, even those with multiple subdomains like www.sub1.sub2.mydomain.com. You could have explicit entries for each subdomain, but there is no reason to if they're all being handled by the same web server.



              In IIS, you must bind the site to everything, or to an IP address (the public one, or the DMZ address your firewall forwards the public IP address to). Theoretically, you could bind each subdomains/domain name, but that would be a lot of bindings, and given the number you already have, you're probably adding more on a regular basis, so I would not recommend this.






              share|improve this answer



























                0














                I have this working with thousands of hostnames (subdomains). You probably want a wildcard DNS record (*.mydomain.com). You can use a CNAME record that aliases this to the A record for the main domain (even if the main domain matches the wildcard, like www.mydomain.com). The wildcard record will be used for ANY subdomains not explicitly found in other CNAME or A records, even those with multiple subdomains like www.sub1.sub2.mydomain.com. You could have explicit entries for each subdomain, but there is no reason to if they're all being handled by the same web server.



                In IIS, you must bind the site to everything, or to an IP address (the public one, or the DMZ address your firewall forwards the public IP address to). Theoretically, you could bind each subdomains/domain name, but that would be a lot of bindings, and given the number you already have, you're probably adding more on a regular basis, so I would not recommend this.






                share|improve this answer

























                  0












                  0








                  0







                  I have this working with thousands of hostnames (subdomains). You probably want a wildcard DNS record (*.mydomain.com). You can use a CNAME record that aliases this to the A record for the main domain (even if the main domain matches the wildcard, like www.mydomain.com). The wildcard record will be used for ANY subdomains not explicitly found in other CNAME or A records, even those with multiple subdomains like www.sub1.sub2.mydomain.com. You could have explicit entries for each subdomain, but there is no reason to if they're all being handled by the same web server.



                  In IIS, you must bind the site to everything, or to an IP address (the public one, or the DMZ address your firewall forwards the public IP address to). Theoretically, you could bind each subdomains/domain name, but that would be a lot of bindings, and given the number you already have, you're probably adding more on a regular basis, so I would not recommend this.






                  share|improve this answer













                  I have this working with thousands of hostnames (subdomains). You probably want a wildcard DNS record (*.mydomain.com). You can use a CNAME record that aliases this to the A record for the main domain (even if the main domain matches the wildcard, like www.mydomain.com). The wildcard record will be used for ANY subdomains not explicitly found in other CNAME or A records, even those with multiple subdomains like www.sub1.sub2.mydomain.com. You could have explicit entries for each subdomain, but there is no reason to if they're all being handled by the same web server.



                  In IIS, you must bind the site to everything, or to an IP address (the public one, or the DMZ address your firewall forwards the public IP address to). Theoretically, you could bind each subdomains/domain name, but that would be a lot of bindings, and given the number you already have, you're probably adding more on a regular basis, so I would not recommend this.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Dec 13 '14 at 4:26









                  JamesJames

                  2952313




                  2952313



























                      draft saved

                      draft discarded
















































                      Thanks for contributing an answer to Server Fault!


                      • Please be sure to answer the question. Provide details and share your research!

                      But avoid


                      • Asking for help, clarification, or responding to other answers.

                      • Making statements based on opinion; back them up with references or personal experience.

                      To learn more, see our tips on writing great answers.




                      draft saved


                      draft discarded














                      StackExchange.ready(
                      function ()
                      StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f650277%2fmultiple-domains-with-without-www-prefix-on-same-server-running-the-same-co%23new-answer', 'question_page');

                      );

                      Post as a guest















                      Required, but never shown





















































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown

































                      Required, but never shown














                      Required, but never shown












                      Required, but never shown







                      Required, but never shown







                      Popular posts from this blog

                      Wikipedia:Vital articles Мазмуну Biography - Өмүр баян Philosophy and psychology - Философия жана психология Religion - Дин Social sciences - Коомдук илимдер Language and literature - Тил жана адабият Science - Илим Technology - Технология Arts and recreation - Искусство жана эс алуу History and geography - Тарых жана география Навигация менюсу

                      Bruxelas-Capital Índice Historia | Composición | Situación lingüística | Clima | Cidades irmandadas | Notas | Véxase tamén | Menú de navegacióneO uso das linguas en Bruxelas e a situación do neerlandés"Rexión de Bruxelas Capital"o orixinalSitio da rexiónPáxina de Bruselas no sitio da Oficina de Promoción Turística de Valonia e BruxelasMapa Interactivo da Rexión de Bruxelas-CapitaleeWorldCat332144929079854441105155190212ID28008674080552-90000 0001 0666 3698n94104302ID540940339365017018237

                      What should I write in an apology letter, since I have decided not to join a company after accepting an offer letterShould I keep looking after accepting a job offer?What should I do when I've been verbally told I would get an offer letter, but still haven't gotten one after 4 weeks?Do I accept an offer from a company that I am not likely to join?New job hasn't confirmed starting date and I want to give current employer as much notice as possibleHow should I address my manager in my resignation letter?HR delayed background verification, now jobless as resignedNo email communication after accepting a formal written offer. How should I phrase the call?What should I do if after receiving a verbal offer letter I am informed that my written job offer is put on hold due to some internal issues?Should I inform the current employer that I am about to resign within 1-2 weeks since I have signed the offer letter and waiting for visa?What company will do, if I send their offer letter to another company