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

                      Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

                      Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

                      Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020