Localhost Configuration

This page explains how to configure Domain Mapping System on a local WordPress site with your localhost configuration settings.

https://www.notion.so/icons/info-alternate_blue.svg

For operating systems besides Mac OS and Windows, please utilize Google search for instructions about editing your Hosts file.

https://www.notion.so/icons/info-alternate_blue.svg

When building on a live website, domains must be configured on your server in order to map properly. This page explains the localhost equivalent when building a WordPress site locally.

Editing Hosts File on MacOS

  1. Open Terminal and input the following command to edit your Hosts file.
    sudo nano /etc/hosts
  2. Scroll to the bottom of the file and add each domain or subdomain that you want to map. An example is provided here:
## DMS plugin mappings

127.0.0.1 your-first.domain.com
127.0.0.1 your-second.domain.com
127.0.0.1 your-third-domain.com
127.0.0.1 your-fourth-domain.com
127.0.0.1 your-fifth-domain.com

Editing Hosts File on Windows

  1. Press Start and find Notepad. Right-click to Run as administrator.
  2. Once in Notepad, go to File -> Open. Navigate to C:\Windows\System32\Drivers\etc and make sure to select All Files and open/edit the hosts file.
  3. Scroll to the bottom of the file and add each domain or subdomain that you want to map. An example is provided here:

Copy

## DMS plugin mappings

127.0.0.1 your-first.domain.com
127.0.0.1 your-second.domain.com
127.0.0.1 your-third-domain.com
127.0.0.1 your-fourth-domain.com
127.0.0.1 your-fifth-domain.com