Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Subdomain configuration for Multisite WordPress Installation


  • Hi,
     
    I've successfully completed the Multisite WordPress installation using this tutorial. I've chosen the subdomain option (x.site.com)

    I'm able to add new sites from WordPress dashboard but on opening the new site (x.site.com), I get 404 Not Found.
    I know this is because of the Wildcard domain setting which I'm not sure If I've done it right or not.

    My domain is registered on Namecheap.
    I'm using VPS hosting from Hetzner.

    While adding the domain in the cloudron, I've used the Wildcard option and added a DNS A record with name *.example.com pointing to my server's IP.

    Isn't this enough?

    What I need to do so that x.site.com starts pointing towards the multisite which I created in the WordPress dashboard.

  • Staff

    On Cloudron each app gets a unique single origin/domain which then is used to route through the reverse proxy to the app. This means that a single app cannot run on multiple domains. The alternate domains you can set are only redirects. Thus unfortunately a wordpress multisite setup with more than one domain will not work on Cloudron. Multisite setups only work if subpaths instead of subdomains are used.


  • Okay, got It.


  • @nebulon said in Subdomain configuration for Multisite WordPress Installation:

    On Cloudron each app gets a unique single origin/domain which then is used to route through the reverse proxy to the app. This means that a single app cannot run on multiple domains. The alternate domains you can set are only redirects. Thus unfortunately a wordpress multisite setup with more than one domain will not work on Cloudron. Multisite setups only work if subpaths instead of subdomains are used.

    It sounds like what you're actually saying is that even if subpaths are used it's not possible to have a multisite with more than one domain, right?

    So:

    blognetwork.coop/blog1/
    blognetwork.coop/blog2/
    Etc

    Would work.

    But these urls cannot be mapped to any other top level domains.

    So, it's impossible to migrate my WordPress Multisite which has 7 sites all at different domains to Cloudron, even if subpath method is used, correct?

    I thought as much, but good to know for sure.

    I think it's probably worth adding at least the bit I've bolded above to the docs about WordPress apps somewhere.


  • @nebulon Are there any Cloudron plans to add multiple domain support (instead of redirects). My production environment uses 3 top level domains in my Wordpress multisite? I couldn’t bring it to Cloudron otherwise.

    I’m loving Cloudron more and more as I’m learning more about it. I think I want to use it for production one day but if this was what was holding me back, I just wonder if there is a plan to support this because WP Multisite’s built in feature is multiple domains (or sub domains, but I chose top level domains for my 3 sites within the multisite).

  • Staff

    @Lonk Do you think you can open a separate feature request for multi-site here - https://forum.cloudron.io/category/97/feature-requests ? We can schedule it based on how many people are interested. Thanks!


  • No problem, I'm on it! ☺


  • @girish I added two Feature Requests based on your suggestion:

    1. Domain Alias Support at the Cloudron Level (since this would be helpful to all apps, not just WP Multisite)
    2. Official Wordpress Multisite Top-level Domain Support on Cloudron (which would use domain aliases to accomplish this as that's the only feature needed for *full support of WP Multisite)

    I'll be writing a custom Cloudron Wordpress plugin to automatically add top-level domains added to WP's multisite feature directly as a domain alias on the Cloudron app itself. I did this same thing for CPanel and it worked perfectly. Your API is even simpler than CPanel's so it should be even easier to write this for your platform.