How to name multi-sites for different environments (dev and staging)? I have a Drupal project that is a multi-site setup. I currently have my sites named like so:

sites/site1.example.dev
sites/site2.example.dev
sites/site3.example.dev


This is fine for working locally in development, as I can point my browser to site1.example.dev, site2.example.dev, or site3.example.dev and it works. However, when I push this up to staging, I want to be able to access these sites at the following addresses:

site1.example.com
site2.example.com
site3.example.com


Is it possible to simply name these as "[specific_name].example" and configure it so that I don't need to rename/update depending on the environment?

Thanks.
I think you may be looking into aliases.

On your sites folder there should be a example.sites.php. It basically allows aliasing sites to different names.

You could create an if and based on some environment condition (maybe the output of hostname? or a file somewhere that contains prod vs dev), enable or disable the aliases.

More documentation:


https://api.drupal.org/api/drupal/sites!example.sites.php/8.2.x
https://api.drupal.org/api/drupal/sites!example.sites.php/7.x