Documentation on this page includes:

  1. Advanced Settings
  2. Special Page Request
  3. Node Link Patterns
  4. Batch Updating
  5. Content Defaults

Advanced Settings

These settings control advanced features for the module. Some of these features require patches to Drupal core. Please read the documentation carefully before implementing these features.

NOTE: Some of these options may be disabled in the event that patches have not been applied.

By default, these features are all disabled.

Search Settings

Allows the admin to decide if content searches should be run across all affiliates or just the currently active domain. By design, Drupal will only find matches for the current domain.

Search Engine Optimization

There is a risk with these modules that your site could be penalized by search engines such as Google for having duplicate content. This setting controls the behavior of URLs written for nodes on your affiliated sites as follows:

  • If SEO settings are turned on, all node links are rewritten as absolute URLs.
  • If assigned to 'all affiliates' the node link goes to the 'default source domain' (see below). Normally. this is your primary domain.
  • If assigned to a single affiliate, the node link goes to that affiliate.
  • If assigned to multiple affiliates, the node link goes to the first matching domain (determined by the order in which domains were created, with your primary domain matched first).

The optional Domain Source module (included in the download) allows you to assign the link to specific domains.

Default Source Domain

This setting allows you to control the domain to use when rewriting links that are sent to 'all affiliates.' Simply select the domain that you wish to use as the primary domain for URL rewrites. By default this value is your primary domain.

NOTE: This option only fires if you enable SEO rewrites or use the provided Domain Source module.

WWW Prefix Handling

This setting controls how requests to www.example.com are treated with respect to example.com. The default behavior is to process all host names against the registered domain list.

If you set this value to Treat www.*.example.com as an alias of *.example.com then all host requests will have the 'www.' string stripped before the domain lookup is processed.

Users going to a www.one.example.com in this case will not automatically be sent to one.example.com, but your Drupal site will behave as if they had requested one.example.com.

This feature was requested by Rick and Matt at DZone.com

Special Page Requests

For this feature to work, you must follow the instructions in INSTALL.txt regarding custom_url_rewrite_outbound(). If you have not followed the instructions, you should see a warning at the top of the Domains page (Drupal 7: Administration > Structure > Domains, or http://example.com/admin/structure/domain; Drupal 6: Administer > Build > Domains, or http://example.com/admin/build/domain).

In normal uses, such as the default home page, you want to restrict access to content based on the active domain. However, in certain cases, this behavior is not desired.

Take the Track page for each user, for example. The Track page is at 'user/UID/track' and shows a list of all posts by that user. By design, this page may show different results if seen from different domains:

  • one.example.com/user/1/track - Shows all posts by user 1 assigned to the domain one.example.com
  • two.example.com/user/1/track - Shows all posts by user 1 assigned to the domain two.example.com

The behavior we really want is to show ALL posts by the user regardless of the active domain.

The Special Page Requests setting lets you specify Drupal paths for which this behavior is active. These paths are entered in the same way as block settings for page visibility.

Some sample pages that might require this setting. Note, some of these are contributed modules:

  • user/*/track
  • blog/* -- the user blog page
  • mysite/* -- the MySite module
  • popular/alltime -- a View page
  • popular/latest -- a View page
  • taxonomy/term/* -- to show all taxonomy terms at all times
  • taxonomy/term/10 -- to show only term 10 at all times
  • taxonomy/term/*/feed/* -- all taxonomy term feeds

Default and custom Views are often good candidates here as well.

By default, 'user/*/track' is in this list.

The logic for how these links are written is documented in the Search Engine Optimization section above.

Note that the 'search' path is handled separately and need not be added here.

Cron Handling

When Drupal's cron function runs, it runs on a specific domain. This forces Domain Access to invoke its access control rules, which may not be desired.

In most use cases, you will want Domain Access to allow access to all nodes during cron runs. For modules such as Subscriptions, this behavior is required unless all your content is assigned to "all affiliates."

To reflect this, Domain Access provides a configuration option labelled:

[x] Treat cron.php as a special page request

This option is turned on by default. In almost all cases, you should leave this option checked. Doing so allows Domain Access to ignore access checks for nodes when cron runs.

Note that this does not affect node access permissions set by other modules.

XMLRPC Handling

Similar to the above, you may check this option to disable Domain Access rules when Drupal is invoked using XMLRPC.

Node Link Patterns

When using this module, there are times when Domain Access will need to rewrite a node link using custom_url_rewrite_outbound().

Since Drupal is an extensible system, we cannot account for all possible links to specific nodes. Node Link Patterns are designed to allow you to extend the module as you add new contributed modules.

By default, the following core link paths will be rewritten as needed.

  • node/%n
  • comment/reply/%n
  • node/add/book/parent/%n
  • book/export/html/%n
  • node/%n/outline

Where %n is a placeholder for the node id.

If you install additional modules such as Forward or Print you will want to add their paths to this list:

  • forward/%n
  • print/%n

This is an advanced, but necessary feature. Please report any core node path omissions at http://drupal.org/project/issues/domain.

Batch Updating

The module provides batch actions for common tasks. These actions are useful for making rapid changes across all domains. The following actions are available by default:

  • Edit all domain values
  • Edit all site names
  • Edit all URL schemes
  • Edit all domain status flags

Additional batch actions are made available for the Domain Configuration module. Other modules may implement hook_domain_batch() to provide additional batch actions.

It may be necessary to enter the batch form from the primary domain.

For some settings, you may see an 'Update value for all domains' section of the form. You may use this value to reset all domains to the same setting. This option is not available for settings that must be unique per domain, such as the domain string.

For global settings to apply, you must check the 'Apply to all domains' box before submitting the form.

Content Defaults

This feature enables you to predefine domain publishing options for any node type.
When creating new content, the checkboxes under the "Domain Access options" heading are automatically filled with values set up in the Content Defaults form.

By default, Domain Access selects the author's currently active domain as assigned domain and 'Send to all affiliates', which makes the node viewable on all domains of your site.

Default domain access states can also be set up when you edit a content type (Drupal 7: Administration -> Structure -> Content types). You can find the options inside the tab 'Domain access settings' of the content type's edit form.

You may uncheck all options for any content type. But please note when creating new content:

  • Users without permission 'Set domain access status for all content' can't change domain access states.
  • At least one domain has to be assigned.

Default source domain

If using the Domain Source module, you may also set a default source domain for the canonical URL to use for each new content type.