Using Drupal’s in-built multi-site feature with different domain names

13 February 2013

 
Dallas: Each country, as a separate site, would run on the same codebase and use the same theme, but have a distinct database, with individual content. Common configurations would be exported to code as features and then per-site configuration overrides could be handled either in the database or in the country-specific settings file at sites/site.example.con/settings.php.

While it is true that certain tables could be shared between sites, such as the user related tables, the general problem with this model is that sharing content between the sites is complicated.

Using Domain Access

This is a powerful module that allows multiple subdomains to co-exist within the same Drupal instance, and for every piece of content in the system, it provides a special field that allows you to define which domain(s) the content can be “affiliated” with. Content can belong to one single domain or to multiple subdomains.
Domain Access then uses Drupal node access configurations to ensure that each and every request for a node page (e.g. node/1) is only accessible at the domain(s) to which it belongs.

There are many caveats to the Domain Access module’s architecture because, by itself, it lacks support for some basic modules that almost all sites require (e.g. Context, Boost, SecurePages, AuthCache, etc.).  All these modules require some path configuration; e.g., a Context will normally be conditioned to be activated in some paths, but with Domain Access every subdomain represents a different Country content but the path for a page will remain the same.

Taking an example for news page we can have multiple URLS: mexico.mysite.com/news or colombia.mysite.com/news but these modules will not understand differences of content based in our subdomain parameter and extra modules as Domain Context will be required to resolve this issue. The same problem will arise with all the modules that condition them behavior based on path criteria). Even Drupal core does not recognize the domains as a context for paths conditionally showing blocks.

Very different will be with OG having URLS like: mysite.com/Mexico/news or mysite.com/Colombia/news the paths criteria could determine country and page without extra dependencies. However, in several cases there are companion adapter modules, such as Domains Views, that make it possible to filter content (in this case, by way of a contextual argument) that correspond to some specific domain.

Simply put, Drupal is not designed to understand multiple domains as different pages; what Drupal understands well are URIs (relative paths) to your domain. Domain Access has a tendency to end up being a complicated module to understand, requiring a plethora of add-on modules and configurations to handle the conditional content display on a per-domain basis for each country-specific feature you add to your sites.

 

Drupal CMS Development
 

  • WordPress Development in Dallas
  • Drupal Development in Dallas
  • Joomla Development in Dallas
  • eCommerce Magento Dallas
  • Web Development Dallas
  • Web Design Dallas
  • jQuery development Dallas
  • Zend framework development Dallas
  • Airline IBE GDS Integration Navitaire Dallas
  • Airline IBE GDS Integration Aamadeus Dallas