DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

How to create second portal?

Sort:
You are not authorized to post a reply.
Page 1 of 212 > >>





Growing Member





    I have one website running on my dnn instance. i am trying to add a second one without success. these are steps i followed:

    the new website has its own domain and ip address. dnn 9.8.1

    1. create a dns record with my registrar using a new ip address. it is an A record with an entry for www host.
    2. add ip address to nic properties for ip protocol in windows
    3. create a website in iis 10 binding it to the new ip address
    3b. when that didn't work, i added a host header for the second domain on existing website for dnn in iis
    4. create a new site in dnn
    5. create an alias using the new ip address.
    6. after dns record propagated, navigate to new site.
    7. new website redirects to current website

    i would like to navigate to www.mynewdomain.com and see its website - not my current portal 0 site. i have done this in the past with older versions of dnn.

    there is a secondary issue - my new site does not have an ssl certiticate. that and iis settings forcing ssl on my 0 site will probably make this task impossible. i have the feeling that a new site will require a new installation of dnn. ugh






    Veteran Member





      Tony,

      you don't need a new site in IIS when you want to run 2 portals in 1 DNN instance. Fust add the new domain name to the bindings of the existing site.

      If you create a new site, you have to install DNN in another directory (and also use another App Pool Identity and another database - there is a possibility to share one database between two or more instances, but this would lead a bit far now).

      Both ways have their pros and cons. If you have a large number of portals to upgrade you're faster when you only have to upgrade one instance.

      On the other side: If the App Pool "hangs", or one of the portals causes a failure, all the other portals hang as well. I had a typical issue recently with a site that used a module which caused an issue with a newer DNN version, so I could not upgrade this instance before I got an update for this module. If I had all portals in the same instance, all the others would have been on an older DNN version for months.

      Happy DNNing!
      Michael

      Michael Tobisch
      DNN★MVP

      dnnWerk Austria
      DNN Connect





      Veteran Member





        Tony,
        please be sure, you understand DNN aliases correctly: each DNN website alias simply contains the domain name being bound to this DNN website. usually there shouldn't be a binding to an IP address inside DNN (of course, the IIS website needs a binding for the same domain name for the IP address of the DNS A record or all IP addresses - for using SSL you would need a HTTPS (port 443) binding to a specific IP with appropriate SSL certificate.
        DNS: Domain Name > IP address
        IIS: IP-Address > IIS Website (DNN Instance)
        DNN: Domain-Name > DNN Website





        Growing Member





          Posted By Sebastian Leupold on 08 Apr 2021 08:18 AM
          Tony,
          please be sure, you understand DNN aliases correctly: each DNN website alias simply contains the domain name being bound to this DNN website. usually there shouldn't be a binding to an IP address inside DNN (of course, the IIS website needs a binding for the same domain name for the IP address of the DNS A record or all IP addresses - for using SSL you would need a HTTPS (port 443) binding to a specific IP with appropriate SSL certificate.
          DNS: Domain Name > IP address
          IIS: IP-Address > IIS Website (DNN Instance)
          DNN: Domain-Name > DNN Website

          DNS: Domain Name > IP address - this part i think is clear. my dns record for domain2.com points to ip2. and if i create a skeletal website i can navigate to it. ie i created index.html which loads - basically Hello, World.

          IIS: IP-Address > IIS Website (DNN Instance) - this part is less clear. my interpretation for this instruction is that i would edit the Bindings for the portal0/domain1.com website which is an iis website for domain1.com. so i added a binding for www.domain2.com using the new ip2. so i have 2 ip bindings for this iis web application. i have disabled the website i created to test the above change. obviously this implementation is incorrect because navigating to www.domain2.com takes me to www.domain1.com.

          to be clear, i do not have a separate iis website for domain2.com.

          DNN: Domain-Name > DNN Website - i used the dnn Sites interface to add a second site. it now has only www.domain2.com as the alias. so dnn shows 2 sites, the original with an alias of www.domain1.com for the first, and www.domain2.com for the second - the newly created second site for the newly purchased second domain.

          in previous versions of dnn, i was able to create additional sites with one dnn instance almost effortlessly. perhaps i have forgotten something.

           






          Veteran Member





            For your IIS website, you would need at least 4 bindings to host 2 domains:

            • domain1.com
            • domain2.com
            • www.domain1.com
            • www.domain2.com

            You may bind to a single or all IPs for port 80. If you are using SSL, you would need the same for port 443, using a certificate and a dedicated IP (for port 80, you may assign the IP specified in DNS or serve all IPs bound to your IIS - the others will just not be used.

            IN DNN, you would have

            • website 1 with a Portal Alias for domain1.com or www.domain1.com
            • website 2 with a Portal Alias for domain2.com or www.domain2.com

            If you want to use SSL, you need to enable and enforce SSL in website settings and set all pages to "Secure".

            This makes sure, both websites are properly routed by domain1.com and domain2.com. 

             





            Growing Member





              Posted By Sebastian Leupold on 08 Apr 2021 04:14 PM

              For your IIS website, you would need at least 4 bindings to host 2 domains:

              • domain1.com
              • domain2.com
              • www.domain1.com
              • www.domain2.com

              You may bind to a single or all IPs for port 80. If you are using SSL, you would need the same for port 443, using a certificate and a dedicated IP (for port 80, you may assign the IP specified in DNS or serve all IPs bound to your IIS - the others will just not be used.

              IN DNN, you would have

              • website 1 with a Portal Alias for domain1.com or www.domain1.com
              • website 2 with a Portal Alias for domain2.com or www.domain2.com

              If you want to use SSL, you need to enable and enforce SSL in website settings and set all pages to "Secure".

              This makes sure, both websites are properly routed by domain1.com and domain2.com. 

               

              thank you carefully explaining the configuration, and i believe that i have what you specified. unfortunately it does not work, by which i mean, as soon as i navigate to www.domain2.com, i am immediately taken to www.domain1.com

              in iis --> Bindings (for the dnn website)... i have this

              • domain1.com --> ip1
              • domain2.com  --> ip2
              • www.domain1.com --> ip1
              • www.domain2.com --> ip2

              I have ssl for domain1.com, but for simplicity, i have omitted it.

              Regarding DNN, i have what you specified.

               






              Veteran Member





                if you are directed to the wrong site withn a single DNN installation, most likely, the aliases are not properly assigned to the sites. please make sure, there is no alias "domain2.com" for site 1.
                Another issue could be a nixup of IP addresses in DNS, i.e. you assigned IP1 for domain2.com, but DNN should resolve this correctly though.





                Growing Member





                  Posted By Sebastian Leupold on 08 Apr 2021 08:34 PM
                  if you are directed to the wrong site withn a single DNN installation, most likely, the aliases are not properly assigned to the sites. please make sure, there is no alias "domain2.com" for site 1.
                  Another issue could be a nixup of IP addresses in DNS, i.e. you assigned IP1 for domain2.com, but DNN should resolve this correctly though.

                  the site aliases are correct, and my dns entry is correct - ie each points to its own ip address which are in turn bound to the one dnn web instance on iis.

                  i did have trouble creating the second site in dnn due to some missing elements in a template file - for which Joe thankfully pointed to a fix on github. so perhaps there are other corruptions in my installation. i will upgrade one of these days soon to see if it resolves the matter.

                   

                   






                  Growing Member





                    This functionality has been in DNN for years.  I very much doubt that upgrading will make a difference.

                    It is important that the IIS site bindings, and the site aliases in DNN match the way you are accessing the site in the browser.  Ie if you have www.abc.com in the browser then you need an IIS binding linking www.abc.com to the DNN installation and a DNN alias for www.abc.com.

                    If you also access the site from abc.com in the browser then you need an IIS binding linking abc.com to the DNN installation and a DNN alias for abc.com.

                    Thanks,
                    Richard
                    www.dynamisys.co.uk





                    Veteran Member





                      does the wrong direct happen on http or https only?
                      You are not authorized to post a reply.
                      Page 1 of 212 > >>

                      These Forums are dedicated to the discussion of DNN Platform.

                      For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                      1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                      2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                      3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                      4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                      5. No Flaming or Trolling.
                      6. No Profanity, Racism, or Prejudice.
                      7. Site Moderators have the final word on approving / removing a thread or post or comment.
                      8. English language posting only, please.

                      Would you like to help us?

                      Awesome! Simply post in the forums using the link below and we'll get you started.

                      Get Involved