I would like to use D7 to support two domains with same code, themes, modules and even database and content, completely transparent to the end-user.

So, user of oxustech.com would see only oxustech.com and user of oxustechnolgies.com would see only oxustechecholgies.com (not be redirected to oxustech.com).

We don't want to use forwarding/frame forwarding. because frame forwarding will hide the full url and will show every url as oxustechnologies.com only.

The site is under shared hosting and we don't have enough permission to change the Apache setting.

Pointing oxustechnologies.com to same htdocs didn't work.

1 Answer 1


This has worked for me in the past. Given the following assumptions:

  • I assume the server is already configured to direct requests for the domain oxustech.com to the correct site (meaning that this is already working for you)
  • I assume Drupal is finding for your site's settings.php file in the directory /sites/oxustech.com/settings.php
  • I assume you want to make requests for the domain oxustechnologies.com to show the SAME site (same database) as oxustech.com, but displaying the domain oxustechnologies.com as the base URL for all pages accessed through this requests.

IF this is the case, this has worked for me. Try this:

  1. In the /sites directory, rename the file example.sites.php to sites.php
  2. Add the following line at the end: $sites['oxustechnologies.com'] = 'oxustech.com';

This will effectively tell Drupal that oxustechnologies.com is an "alias" of oxustech.com, will use all settings (including the database) for oxustech.com. It will also always display oxsutechnologies.com as the base URL when you navigate inside the site. But people who access the site through the name oxustech.com will continue to see that as the base URL.

  • at the moment we have single site installation where setting.php for oxustech.com is under default folder. Do we need to change the current setting into multi-site setting ? and have oxustech.com folder ? thanks
    – Yama
    Commented Nov 23, 2015 at 21:12
  • I haven't tried that situation. You can try and see if $sites['oxustechnologies.com'] = 'default' works for you. If not, then I'd try moving the settings.php file and all other files used by the site to its own folder called oxustech.com
    – argiepiano
    Commented Nov 23, 2015 at 21:17
  • I'm curious if you could make this work?
    – argiepiano
    Commented Nov 24, 2015 at 19:15

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.