Share via

Need help with Configuring Nginx for WordPress Multisite

Ibidayo Awosola 0 Reputation points
2026-03-10T20:33:47.5833333+00:00

We would like to request assistance in configuring our Nginx server to support WordPress Multisite with subdomains.

It appears that we require wildcard subdomain support to enable the proper functioning of the multisite network.

Kindly help us update the server configuration by adding the standard WordPress Multisite subdomain rewrite rules to the Nginx configuration.

Azure App Service
Azure App Service

Azure App Service is a service used to create and deploy scalable, mission-critical web apps.


2 answers

Sort by: Most helpful
  1. Praneeth Maddali 7,815 Reputation points Microsoft External Staff Moderator
    2026-03-10T21:17:04.5433333+00:00

    HI @Ibidayo Awosola

    Thank you for reaching us . From your description, the requirement is to run WordPress Multisite using subdomains, which does require some manual configuration when Nginx is used as the web server.

    For subdomain‑based multisite to work correctly, two things are essential:

    Wildcard DNS :A wildcard record (for example, _.yourdomain.com) must be configured so all subsites resolve to the same App Service._

    Nginx server‑level rules: Since Nginx does not use .htaccess WordPress cannot add rewrite rules automatically. The multisite routing rules must be applied directly in the Nginx configuration.

    On Azure App Service, Nginx updates are applied through a startup script, which ensures the configuration persists across restarts.

    Reference :

    Subdomain Multisite on Azure App Service:

    https://techcommunity.microsoft.com/blog/appsonazureblog/how-to-set-up-subdomain-multisite-in-wordpress-on-app-service/3886283

    Updating Nginx configuration on Azure App Service:

    https://techcommunity.microsoft.com/blog/appsonazureblog/updating-nginx-default-configurations-on-azure-app-services-managed-wordpress/3710146

    How to set up subdirectory Multisite in WordPress on Azure App Service

    https://techcommunity.microsoft.com/blog/appsonazureblog/how-to-set-up-subdirectory-multisite-in-wordpress-on-azure-app-service/3791071

    Once the wildcard DNS is in place and the required Nginx rules are applied, the WordPress Multisite subdomains should function as expected.

    If the answer is helpful,  Please do click "Accept the answer” and Yes, this can be beneficial to other community members.

    If you have any other questions, let me know in the "comments" and I would be happy to help you

    0 comments No comments

  2. Q&A Assist
    2026-03-10T20:34:07.2366667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    On Azure App Service for WordPress, NGINX configuration changes (including rewrite rules and wildcard host handling) are made via a startup script rather than by editing NGINX config files directly.

    To support WordPress Multisite with subdomains and wildcard-style behavior on this platform, the required NGINX rules must be placed into that startup script so they are applied when the App Service container starts. The startup script is the supported mechanism for updating the default NGINX configuration for WordPress on App Service.

    Follow the guidance in the NGINX startup script article for WordPress on App Service to:

    1. Create or update a startup script for the WordPress App Service.
    2. In that script, modify the NGINX configuration to add the WordPress Multisite subdomain-related rules and any needed wildcard server_name configuration.
    3. Ensure the script is configured as the App Service startup command so the NGINX changes are applied on each restart.

    This approach is required because direct edits to NGINX config inside the container are not persisted and are not the supported customization method on Azure App Service.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.