Multisite Subdomain

To run a multisite in DevKinsta that uses subdomains for the subsites (subsite.example.local), a few adjustments will need to be made. These steps are not necessary if your multisite network uses subdirectories/subfolders (example.local/subsite).

This is also part of a workaround if you have a subdomain type of multisite with domain mapping. You will first need to deactivate your domain mapping plugin (if applicable) or change the mapped domains to subdomains (if your mapping is done with the domain mapping built into WordPress multisite). Then you can continue with the steps below.

Important notes:

  • This tutorial requires you to edit your hosts file, which is generally considered an intermediate to advanced topic. We have a guide here with instructions for Windows and Mac: How to Edit Your Hosts File – Preview Site Before Updating DNS 2. If you’re not comfortable making these changes or have any trouble after making changes to your hosts file, we recommend working with a developer or IT professional to set this up.
  • Each time you add a new subsite, you’ll need to repeat the steps outlined here.
  • These steps will need to be done whether you start a new subdomain multisite or import an existing site from Kinsta.

Edit your hosts file

Note: If you haven’t already, add your new subsite(s) in your WordPress dashboard, then edit your hosts file as described below.

  1. Find the lines in your hosts file that coincide with your multisite. Example:
    127.0.0.1 example.local
    127.0.0.1 www.example.local
    ::1 example.local
    ::1 www.example.local
  2. Add each subdomain beneath the multisite lines like:
    127.0.0.1 example.local
    127.0.0.1 www.example.local
    127.0.0.1 subdomain.example.local
    ::1 example.local
    ::1 www.example.local
    ::1 subdomain.example.local
  3. After adding your subdomain(s), save your changes to your hosts file.

You should now be able to visit your subsite on your local site.

Viewing a DevKinsta subdomain multisite in the browser.
Viewing a DevKinsta subdomain multisite in the browser.
Was this article helpful?

© 2013 - 2025 Kinsta Inc. All rights reserved. Kinsta®, MyKinsta®, and DevKinsta® are trademarks owned by Kinsta Inc.The WordPress® trademark is the intellectual property of the WordPress Foundation, and the Woo® and WooCommerce® trademarks are the intellectual property of WooCommerce, Inc. Uses of the WordPress®, Woo®, and WooCommerce® names in this website are for identification purposes only and do not imply an endorsement by WordPress Foundation or WooCommerce, Inc. Kinsta is not endorsed or owned by, or affiliated with, the WordPress Foundation or WooCommerce, Inc. Legal information