Drupal 6, default installation, default .htaccess, default http.conf for Apache.

sites/ directory looked like this:


default site and subdomain1 working well.

Added a new directory, subdomain2.maindomain.com. It has the same ownership and permissions as subdomain1.maindomain.com. It contains default.settings.php, the out-of-the-box one, and settings.php, which is a copy of default.settings.php. The permissions and ownership of the two files are correct.

The 'sites' directory now looks like this:


Visiting subdomain2.maindomain.com returns an error. Visiting subdomain2.maindomain.com/install.php returns an error. I can download an example file from maindomain.com/sites/subdomain2.maindomain.com/files/example.txt when it is located at /sites/subdomain2.maindomain.com/files/example.txt.

Basically, I've followed all the steps in the docs, and I'm unable to create another 'subsite' accessible from a new subdomain. What am I doing wrong? What else should I be doing?

  • 1
    What exact error does subdomain2.maindomain.com return?
    – mpdonadio
    May 17, 2012 at 22:47
  • 'Connection has timed out'. hmm....
    – kjbowrin
    May 18, 2012 at 15:10
  • 4
    I think you have a DNS issue and/or an Apache config issue. dig subdomain2.maindomain.com and make sure it points to the right place. Then watch the request with Firefox Live HTTP Headers and see what is happening. Then check the Apache access and error logs and try to match everything up.
    – mpdonadio
    May 18, 2012 at 15:15
  • You just create new subdomain2.maindomain.com domain that have code base from your main default drupal site. If you run at local you must input new line in hosts file to make it works
    – Stone Vo
    May 8, 2013 at 5:06

2 Answers 2


If you want to run several sub-domains on the same code base you need to make sure that either both the sub-domains resolve to the same IP address as your main domain, or that your main domain supports wildcard DNS. You also might consider giving Subdomain module and Domain Access module a try.


Check that subdomain2.maindomain.com should point to the same directory as is subdomain1.maindomain.com in the cpanel. This directory is the root of Drupal installation.

Firstly simply create a symbolic link ( ln -s subdomain1.maindomain.com subdomain2.maindomain.com ) and see if the subdomain2 is accessible. Otherwise it is configuration issue with Apache/Cpanel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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