Domain Mapping

Hi, I'm trying to use WP Multisite Network with top level domains. You will see the primary and secondary domain in my account. They are new sites so I don't need a backup. I believe I followed https://premium.wpmudev.org/blog/how-to-build-a-wordpress-multisite-network-with-multiple-domains/ correctly, but some of the information is either out of date or incorrect.

I have some questions:

1. How should domains be added? Network Admin -> Settings -> Multi-Domains instead of Network Admin -> Sites -> Add New I suspect.
2. Can Cloudflare be used with Multisite?
3. I get a “connection not private” warning in Chrome when I browse to my secondary domain. When I bypass that warning I get the cPanel error page, https://secondary-domain.com/cgi-sys/defaultwebpage.cgi. How do I fix both of these issues?

Thanks.

  • James Morris

    Hello Zylstra

    1. How should domains be added? Network Admin -> Settings -> Multi-Domains instead of Network Admin -> Sites -> Add New I suspect.

    Yes, Network Admin -> Settings -> Multi-Domains is how you will setup the other sub-network domains.

    2. Can Cloudflare be used with Multisite?

    In this situation, I don't recommend it unless you are willing to pay for one of their business packages. You will likely have issues using the free version of their service.

    3. I get a “connection not private” warning in Chrome when I browse to my secondary domain. When I bypass that warning I get the cPanel error page, https://secondary-domain.com/cgi-sys/defaultwebpage.cgi. How do I fix both of these issues?

    The domains you add in Domain Mapping and/or Multi-Domains must be pointed to the same directory as the primary domain.

    For example, when you first setup your Multisite Network, if you pointed your primary domain to /home/user/public_html, when you use Parked Domains or Addon domains to add your secondary domains to your Multi-Network, they also must be pointed to /home/user/public_html,

    Since you are using cPanel, it is likely you have Let's Encrypt enabled and you can generate SSL certificates for any Addon domain. I highly recommend doing this. If you plan on using subdomains of your primary and secondary domains, you'll want to ensure that you use the dns-01 validation method.

    Let us know if you have any further questions. We'll be happy to help! :slight_smile:

    Best regards,

    James Morris

  • Zylstra

    Thanks, James.

    Adding the cPanel -> Addon Domains is what I needed to do. For document root I used simply public_html since the "Create an Addon Domain" function assumes the correct home folder. I got a couple errors initially. One is that I needed to allow Addon Domains via WHM » Account Functions » Modify an Account. Another one is that I needed WHM -> Tweak Settings -> Allow Remote Domains.

    I see through WHM -> Manage SSL Hosts that the SSL is set up for my addon domain.

    When I browse to my secondary domain I am redirected to my primary domain. How do I fix this?

    Does WPMU DEV provide documentation on how to set up and use their plugin?

  • James Morris

    Hello Zylstra

    If the Addon domain is now going to the primary domain of the Network, then the file system pointer is all good now. Then, you just need to follow the directions on the plugin's Documentation at https://premium.wpmudev.org/project/domain-mapping/#wpmud-hg-project-documentation If you would like a bit more detail, you can see our blog post https://premium.wpmudev.org/blog/domain-mapping-wordpress/

    Between these two articles, this should get you going.

    Let us know if you have any further questions. We'll be happy to help! :slight_smile:

    Best regards,

    James Morris

  • James Morris

    Hello Zylstra

    In order to help you better with your issue, would you please grant me access to your site and server so I can perform some advanced debugging?

    NOTE: Please make a full backup of your site before sending the following information.

    Please visit the Contact page and complete the form with the following information:

    https://premium.wpmudev.org/contact/#i-have-a-different-question

    Option: I have a different Question

    Subject: "Attn: James Morris"

    In the Message box, please provide the following:

    - link back to this thread for reference
    - any other relevant urls

    - Admin login:
    Admin username
    Admin password
    Login url

    - Hosting Control Panel Login
    Admin username
    Admin password
    Login url

    Best regards,

    James Morris

  • James Morris

    Hello Zylstra

    The secondary domain redirecting to the primary domain is normal behavior. That domain will only act as a container for subsites. So, seconddomain.com/subsite will work, but seconddomain.com/ will not.

    However, I did look into your setup further and I'm finding a very strange redirection issue where the subsites continually redirect to itself. For example: seconddomain.com/subsite -> 301s to seconddomain.com/subsite -> 301s to seconddomain.com/subsite over and over.

    I have mirrored your configuration over to my own testing site and could not reproduce. I also checked your .htaccess and wp-config.php and all looks good there. The only thing that stops the redirection look is disabling Domain Mapping, which doesn't make sense because these two plugins are compatible and both work well on my dev site. Also, there's no conflict that I've been able to detect.

    I'm going to flag this issue for our SLS Team (code experts) so that they can dig into this issue further for you. An update will be posted here as soon as more information is available. Thank you for your patience while we sort through this issue.

    Best regards,

    James Morris

  • James Morris

    Hello Zylstra

    The tagline of this post leads me to believe that Domain Mapping allows seconddomain.com to appear as a WP installation. Is this not the case?

    It's not your mapped domains (defined in Domain Mapping) that are not displaying as a WordPress site, but the secondary domains defined in Multi-Domains.

    In Multi-Domains, your original Primary domain that you originally setup WordPress with will have a WordPress install, but all secondary domains will be treated as placeholder domains. They will not display a WordPress install on the root domain, but will redirect back to the Primary domain. All subsites in the secondary domain will work correctly though.

    Now, when used in conjunction with Domain Mapping, you can map unique domain names to the secondary domain subsites to mask that they are on the secondary domain.

    Basically, Multi-Domains is just a method for providing options for root domains for subsites.

    For example:

    Primary Domain - mynetwork.com
    Secondary Domain - yourwpblog.com

    If you have a subfolder based setup, your users can signup under
    mynetwork.com/subsite
    OR
    yourwpblog.com/subsite

    In a subdomain based setup, your users can signup under
    subsite.mynetwork.com
    OR
    subsite.yourwpblog.com

    But your content and marketing will all be handled by mynetwork.com. yourwpblog.com will not display content on the root domain. It will redirect back to mynetwork.com.

    I'm afraid I cannot give an ETA on when the issues you are experiencing will be addressed. There are too many variables that have to be considered and troubleshooting can sometimes take a bit. Our team is looking into this and more information will be posted as it's available.

    Thank you for your patience while we sort through this! :slight_smile:

    Best regards,

    James Morris

    • Zylstra

      James, the main reason I wanted to set up two sites with one file system and database is so that users would not have to sign up for accounts on each site. I wanted each site to host its own content with no overlap. Why would anyone care where someone signs up if secondary.com simply forwards to primary.com? And why would I need WP for that at all anyway? I could simply set up a domain forwarder at my registrar!

      Perhaps I'm not understanding. When you say "yourwpblog.com will not display content on the root domain." do you mean "yourwpblog.com will not display content on yourwpblog.com [because it is redirected to mynetwork.com]"? If that's the case why would anybody use yourwpblog.com for anything associated with mynetwork.com?!

      Do you offer phone support? Because I don't feel we're getting anywhere with this thread. Or perhaps we did get somewhere, and that somewhere is my knowledge that WPMU DEV's two multisite plugins don't do much of anything, in so far as to help me create what I'm looking for?

      • James Morris

        Hello Zylstra

        I'm afraid we don't offer phone support, but we do have Live Support via chat. Perhaps that may be more productive for this discussion?

        I apologize for my unclear explanation of how these plugins work. Perhaps the plugin docs will make this more clear.

        https://premium.wpmudev.org/project/multi-domains/#wpmud-hg-project-documentation
        https://premium.wpmudev.org/project/domain-mapping/#wpmud-hg-project-documentation

        Multi-Domains allows you to offer multiple choices for unmapped root domains. Meaning, your client can select from a range of predefined domains to register under.

        This is a great model if you have a collection of domains you wish to use for your network. Think of it as silos. You can silo your clients into different domain structures. Say, if you want to offer keyword rich domains instead of broad generic names as an offering in your Network, but the clients don't want to buy their own domain.

        A good example would be:
        mynetworkblogs.com/client1
        homerepairblogs.com/client2
        happyhobbyblogs.com/client3
        funfoodblogs.com/client4

        All of the above are hosted on the same Multisite/Multi-Domain network, but the customer does not control the domain name. Only the /client# portion.

        BUT! The only domain in this model that will display your content is the primary domain.

        mynetworkblogs.com would be the primary domain in this case. The other three would be secondary domains and would redirect back to mynetworkblogs.com except for the subsites hosted on those domains.

        So:
        mynetworkblogs.com -> Displays YOUR content
        mynetworkblogs.com/client1 -> Displays your client's content
        homerepairblogs.com -> Redirects to mynetworkblogs.com
        homerepairblogs.com/client2 -> Displays your client's content

        And so on...

        You can then use Pro Sites and Domain Mapping to make mapping their own domain name to their registered subsite a premium upgrade. So that, if the client leasing homerepairblogs.com/client2 wants the domain name tristateremodeling.com, they can have that as the mapped domain.

        I hope this clarifies a little bit. Again, it's probably best to also refer to the documentation as it does a pretty good job of explaining what these plugins are intended to do. There's also a very large collection of blog posts and forum posts related to both of these plugins. A quick search here should also reveal a wealth of knowledge.

        Best regards,

        James Morris

        • Zylstra

          Ahhhhhhhhhhh...

          Wow, yeah, I read the docs. They did nothing for my understanding. Your post should be mandatory reading, front and center of every page we've mentioned in this thread.

          And now the plugins show my secondary domain fine, now that I set it up correctly.

          Why does the first image in Configuring Network Settings on the Domain Mapping docs page not show the Multi-Domains plugin? Domain Mapping does not work without Multi-Domains, correct?

          OK, enough, here. Thank you for guiding me through this. If I have any other questions I'll open a new thread.

          • Kasia Swiderska

            Hello Zylstra,

            Domain Mapping does not work without Multi-Domains, correct?

            No. Both plugins are independent. You can use only Domain Mapping or MultiDomains - or you can use both at the same time.

            I just want to correct one thing - MultiDomains plugin works only on subdomain based Networks. So more correct examples of use would look like that

            mynetworkblogs.com -> Displays YOUR content
            client1.mynetworkblogs.com -> Displays your client's content
            homerepairblogs.com -> Redirects to mynetworkblogs.com
            client2.homerepairblogs.com -> Displays your client's content

            Domain Mapping on the other hand works both on subdirectory and subdomain Networks.

            kind regards,
            Kasia

  • splaquet

    If they're on the same account and big use SSL, then I'd assume that the problem actually lies within Apache.

    Check out my comments on this thread:
    https://premium.wpmudev.org/forums/topic/ssl-problem-wordpress-multisite#post-1321524

    There's something in the way that Apache handles add-on domains & SSL that creates an issue. My link above explains how to work around that issue.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.