Multiple Domain Manager

From apnsGuide

Jump to: navigation, search

Contents

MDM Types

Shared

Shared is now the preferred method of hosting multiple domains under the same account holder. Shared nets you all of the general benefits of the Reseller method, addressed below, in addition to pooling bandwidth and disk space from your main domain. This means you never need to reshuffle bandwidth and disk space around, plus you can manage as many domains as you'd like straight from the control panel automatically.

Instead of using /var/www/html/ for the document root, you can assign an arbitrary location in your account, e.g. /var/www/newdomain.com/ or point the new domain to an existing subdomain, e.g. http://subdomain.domainname.com/ which serves as the document root for http://www.newdomain.com/. By default, e-mail accounts are mirrored from the primary domain. This may be remapped through Mailbox Routes or disabled entirely through Mailer Table.

Pros

  • Easily manage multiple domains under different document roots, which are just directories on the server
  • Any sub-user (User Administrator) can own a domain and have access to the document root for a domain
  • sally@domain1.com is the same as sally@domain2.com in terms of e-mail access unless otherwise modified through Mailbox Routes
  • No limit on the number of domains that you may host
  • $0 setup fee for each new domain

Cons

  • The account holder of the primary domain is the liaison for support and managing additional user accounts

Shared Creation Process

Once a new domain is created per the Shared method, the server only creates the necessary Web server configuration directives and provisions DNS. E-mail and site configuration information are not updated until Synchronize Changes is pressed. All domains listed in the MDM are synchronized with the site configuration on record. During this stage e-mail accounts are mirrored from the primary domain. If you would like to disable e-mail for the secondary domain, then visit Mailer Table to remove the domain from the mailer table. This will delete all e-mail accounts attached to the domain.

After adding the new domain to your account change the nameservers to ns1.apisnetworks.com and ns2.apisnetworks.com. If your domain ends in a .com or .net, then this will take a few minutes to update (unless the domain was previously hosted somewhere). Otherwise you may need to wait up to 24 hours for changes to propagate.

Handling E-mail Collisions

Inevitably with the e-mail mirroring process e-mail for sally@domain1.com will go to the same user as sally@domain2.com. To avoid this situation and designate e-mail destined for sally@domain1.com to a separate user account visit Add User to create a new user account, e.g. sally_domain1. Visit Mailbox Routes and drop the sally@domain1.com e-mail account and create a new virtual e-mail account that maps to user sally_domain1. Add the new e-mail profile to your e-mail client and voila.

Creating an Alias

An alias can be created for a domain by duplicating the document root value. For example, to create an alias of the primary domain specify the document root value of /var/www/html/. An alias for an existing domain located elsewhere can be accomplished by specifying the document root of the existing domain listed in Multiple Domain Manager.

Reseller

Originally, the Shared method of multiple domain hosting served as an excellent way of separating domains into multiple accounts with the added benefit of separate logfiles, which could be used by Urchin. With the advent of Granular Logging however, this changed. Logs may be separated into separate files and likewise additional Urchin profiles (or AWStats, Webalizer) may be created for teh separate logs. Further, e-mail addresses may be separated based upon the domain via Mailbox Routes.

Setting up a new domain per the Reseller method is analogous to purchasing another hosting account. As they are analogous to purchasing another account, they carry some unavoidable managerial overhead with them, i.e. the liability of managing another hosting account ontop of your existing one. You will need to monitor disk quota and bandwidth usage under two separate control panels with two separate login identities. Due to restrictions in the underlying infrastructure, primary login names must be unique across the server.

Reseller-style accounts also carry a $5 setup fee to offset Urchin licensing costs and the filesystem and Apache memory overhead of provisioning another account. If you would like to setup an Reseller domain, please file a ticket with the new domain name, a unique login, password, disk space, and bandwidth quota to pull from your existing account.

Pros

Cons

  • Requires a unique login, password, disk space, and bandwidth allocation
  • Adds another separate account to manage
  • Requires separate FTP login to access files
  • No direct way to shuffle files between accounts without logging into two separate FTP accounts
  • $5 setup fee

Similarities

  • Both allow for unlimited subdomains
  • Both methods retain the new domain name in the browser window
  • Log files can be used with either type. For Shared, just use Granular Logging to setup logfiles for the additional domains


Creating domain redirects/domain forwarding

Domain forwarding/redirection redirects a user accessing one domain to another domain. For example, a user who accesses domain1.com only to be transported to domain2.com is said to be redirected/forwarded to domain2.com. Two variations of domain redirection exists, unmasked and masked. A masked redirection hides the URL in the browser window while an unmasked redirect changes the URL in the browser to reflect the new URL.

Unmasked Redirects

Create a file named .htaccess in the directory assigned via Multiple Domain Manager. You should always give domain redirects their own directory, like /var/www/domain1/. Using mod_rewrite, add the following rules to your .htaccess file:

/var/www/domain1/.htaccess
RewriteEngine On
RewriteRule .* http://www.domain2.com/ [R=301,L]

Users accessing http://www.domain1.com/ will be instantly redirected to http://www.domain2.com/. The new URL will also be reflected within the user's browser.  301 is a special code to instruct search engines that this is a redirect.  Redirections won't penalize your search engine rankings.

Masked Redirects

Masked redirects hide the new URL in the browser so that the old domain still appears. Let's assume that the domain domain1.com were added in Multiple Domain Manager with a document root /var/www/domain1. In order to redirect anyone accessing http://domain1.com/ to http://domain2.com and hide the URL domain2.com, we will use the the Proxy flag.

/var/www/domain1/.htaccess
RewriteEngine On
RewriteRule ^(.*)$ http://www.domain2.com/$1 [P,L]

Status codes are irrelevant as the URL as it appears within the browser does not change.

Personal tools