multi-domain recognition at db level
You need to enable multisite. 

The documentation inside the settings.php file is also very helpful, read that too by viewing the source of the file here https://api.drupal.org/api/drupal/sites!default!default.settings.php/8.

Briefly, the steps are,


Multi-site requires the existence of the sites/sites.php file in your Drupal 8 installation. You will need to create this file manually.


Example content would be:

&lt;?php
$sites['mysite.com'] = 'site1';
$sites['8000.localhost'] = 'site2';



Create a site directory inside sites/, the path should be sites/site1.
Put a settings.php file in this directory in order for Drupal 8 to recognize it.
Visit the URL of site1, like mysite.com to install it.