Skip to content

1a. DNS configuration

izmeez edited this page Oct 2, 2024 · 3 revisions

Server DNS configuration

The server DNS configuration must be correct for the domain module to work.

The goal is to have the primary domain and all subdomains or other affiliate domains point to the same webroot directory. For example:

example.com
one.example.com
two.example.com
affiliate.com

must all resolve to the webroot of the primary domain.

The specifics of how to do this depends on the server setup or dev environment.

Configure cname records and apache vhosts or use cPanel or equivalent, if you know how, or ask your hosting provider or IT support.

Local hosts file update for simple environments

For simple dev environments it may sufficient to add lines to the hosts file for the required subdomains and affiliate domains.

Laravel

To add extra subdomain and domain urls to a laravel installation ...

Using DDev with Domain Access

Instructions on how to add a second domain to a DDev instance can be found at ddev docs.