Multiple Domains Subsite

Hey all

I have noticed that the native WP domain mapping doesn’t seem to work with www. and non-www. variations . The non-www. domain directs to the primary site rather than the sub-site.

As I’m used to working on single sites with domain aliases rather than MU, how can I go about making it so that different domains and variations of the same domain are directed to a specific sub-site?

I will also need to be able to have 2 different domains pointing to a single site so would like to know how to do that (.com and .com.au variants) TIA

  • Adam
    • Support Gorilla

    Hello Jamie

    I hope you’re well today and thank you for your question!

    If it was about www/non-www only I’d say that redirect would be a workaround but if you need to be able to also use different domains for a site at the same time you will need an additional plugin for this.

    I’d suggest WP Ultimo as it provides domain mapping/aliases features (including aliasing multiple domains to single sub-site) and a whole set of other features that might turn out to be useful:

    https://wpultimo.com/

    Best regards,
    Adam

  • Adam
    • Support Gorilla

    Hi Jamie

    For the time being, how would I go about doing a basic redirect as a temporary fix to the www. and non.www domain?

    I understand that the site in question is hosted with us, right?

    We can add redirects to nginx configuration for you, if necessary, but I”d need to know which site too so if you need that to be done, confirm please and let me know about the site.

    Note please: I’m not quite sure how such redirects will then affect WP Ultimo so please remember about them being added in case it turned out WP Ultimo is affected by that.

    Best regards,
    Adam

  • Jamie
    • Flash Drive

    Thanks for that Adam,

    Yes, that’s right my website is hosted with WPMUDev.

    If its not as simple as it is with single sites and if it will potentially cause issues down the line, I’ll leave it be for now. I don’t need to move all domains across until around the end of September so that gives me a few months to decide on WPUltimo or another solution.

    Thanks for your help, I’ll get in touch via the support forms should I decide on the redirects.

  • Adam
    • Support Gorilla

    HI Jamie

    Thanks for response!

    It’s not that complex but yes, it has to be done by devops on a server level as otherwise server configuration is not accessible. WP Ultimo would be a better solution, in my opinion, anyway as it just gives you way more “flexibility” in the area :slight_smile:

    However, if you decide you’d like us to set these redirects for you after all, don’t hesitate and just update me here in this ticket and we’ll take care of it, whether it will be tomorrow or in a year form now – we’re ready to “jump back in” at any time :slight_smile:

    Best regards,
    Adam

    • Jamie
      • Flash Drive

      Hi Adam Czajczyk ,

      I’ve had a look at WPUltimo but I feel its not right for me right in this moment. If you could, I’d like to take up the offer on the redirects. I only have 2 URLs plus the www and non-www variants for this particular multisite sub-site.

      If you could set up the following to point to http://www.jamieauldphotography.com.au on your server level, that would be great. I have already set up the main domain/domain mapping for this sub-site

      I need: jamieauldphotography.com, http://www.jamieauldphotography.com and jamieauldphotography.com.au all to point to the domain listed directly above.

      Let me know if you need anything from me.

  • Adam
    • Support Gorilla

    Hi Jamie

    Thanks for response!

    Before I bring this to our devops, let’s make sure that we are on the same side with this request (as it’s already been some time since last posts in this ticket). Can you confirm that:

    1) the main site and primary domain of this multisite is currently “www.jamieauld.com.au”

    2) the “www.jamieauldphotography.com.au” is domain that’s already mapped to one of the sub-sites of that multisite and is working fine, ex expected

    3) and now you need the non-www version of that domain do redirect to that sub-site to so “jamieauldphotography.com.au” would redirect to “www.jamieauldphotography.com.au”

    4) and also both “jamieauldphotograhpy.com” and “www.jamieauldphotography.com” to redirect to “www.jamieauldphotography.com.au”

    Is that right?

    Note please that, regarding points 3 and 4 above, all it can be (without using a plugin such as WP Ultimo) would be a redirect and not mapping/masking so end user would end up after all at “www.jamieauldphotography.com” anyway.

    If that’s all fine I’ll pass it over to our Hosting team to take care of.

    Best regards,
    Adam

  • Aditya Shah
    • DevOps Team Lead

    Hi Jamie

    Hope you are doing well.

    I have added custom Nginx rules for the domains mentioned so all three domains now redirects to “www.jamieauldphotography.com.au”.

    However, the better, easier, and faster way is to use Cloudflare page rules for these type of redirects, which gives you the ability to add/modify the redirects without reaching out to us for any new domain that you would like to map. Please refer to https://support.cloudflare.com/hc/en-us/articles/200172286-Configuring-URL-forwarding-or-redirects-with-Cloudflare-Page-Rules

    Hope this helps you. Please let us know if you need any further help with this.

    Best Regards,
    Aditya Shah