I am wondering if multisite Drupal allows you to have a default site too. Something like sites/default/settings.php and sites/mysite/settings.php along with the proper sites.php. If yes then what should sites.php look like?


For sure you can have a default site to use i case if the requested site was not available some reason the default site will be open to user. to do that you need to setup the default site setting under sites/default/setting.php

lets assume we have 3 website

  1. mysite1.com
  2. mysite1.com
  3. mysite3.com
  4. defultsite.com

In that case your file structure needs to be :

  1. /sites/mysite1.com folder which will have setting.php file for mysite1
  2. /sites/mysite2.com folder which will have setting.php file for mysite2
  3. /sites/mysite3.com folder which will have setting.php file for mysite3
  4. /sites/default folder which will have setting.php file for default site

You need to setup your .htaccess file in your root of server to point every Domain to the main drupal folder. to learn more about .htaccess please read here.

No to test if your default site is working simply rename mysite1.com folder to xxxxx and now try to access your mysite1.com using any browser it shoud take you to default site because mysite1.come folder cant be found anymore.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.