Managing Multiple Domains from a Single Hosting Account
Managing multiple domains from a single hosting account is relatively easy but will require you to correctly configure some DNS settings and create addon domains.
For this post, I’m going assume you’ve already registered a few domains and have access to your hosting interface via a main domain.
Before going any further, let’s specify some working examples:
- cpanelrocks.net — Our account’s main domain. This domain was set up for you by your hosting provider. In other words, we already control this domain.
- cpdocs.com — The domain we are going to add to our account.
- ns1.cpanelrocks.net — Our local server’s primary nameserver.
- ns2.cpanelrocks.net — Our local server’s secondary nameserver.
- 220.127.116.11 — The IP address our addon domain will use.
What is an addon domain?
Addon domains are a type of virtual hosting that allow you to manage multiple domains from a single hosting account. Addon domains share the hosting account’s resources with the main domain.
Why addon domains?
You can use them to save money. With addon domains, you don’t have to purchase an additional hosting account for each domain you operate. You can simply create addon domains and split your existing account’s resources.
Addon domains. How do they work?
Addon domains are subdomains that have their own, unique domain names.
Like subdomains, addon domains are stored in a subdirectory somewhere in your home directory. Essentially, visitors to your addon domain will be routed to this directory. You may specify the name and precise location of this directory when creating the addon domain. It’s not necessarily a requirement that an addon domain’s directory be in public_html, though it’s generally considered good practice.
In our example, the addon domain’s public_html subdirectory will be ~/public_html/cpdocs.com/.
What do I need to do before creating the addon domain?
This is the difficult part. It’s difficult because I can’t possibly explain every domain registrar’s interface. I have; however, provided screenshots of my registrar’s interface below.
All we’re going to do in this step is change our addon domain’s primary nameservers at the registrar. We need to specify our local nameservers, in this case ns1.cpanelrocks.net and ns2.cpanelrocks.net. This change can take a few hours, so be patient.
When changing your nameservers, you’re going to need to find the section of your registrar’s interface that looks like this:
Clicking the Modify Servers link (or a similar link) will allow us to view and change the domain’s primary nameservers. Let’s specify the domain’s local nameservers (ns1.cpanelrocks.net and ns2.cpanelrocks.net) on the next page.
Once our nameservers are set up, we can create the addon domain.
How do I create the addon domain?
To create an addon domain, we can use cPanel’s Addon Domains feature, in the Domains section of the cPanel interface.
- Enter the addon domain’s domain name in the New Domain Name field. In this case, we will enter cpdocs.com.
- Ensure the FTP username is appropriate in the next field. In this scenario, we will leave it as its default value, cpdocs.
- Make sure that the document root is in the appropriate place. In this example, we will use the default value, ~/public_html/cpdocs.com/.
- Enter and confirm the password you want to use with this domain in the appropriate fields. This password will be used for the domain’s MySQL and FTP accounts.
- Click the Add button.
Verifying our DNS settings
We need to verify that the domain’s IP is set up correctly. We can use cPanel’s Advanced DNS Zone Editor to review and change DNS information. The IP address from our working example is 18.104.22.168.
We can see in the image above, that the information is correct. If the information is not correct, simply change the A record’s Address value by clicking the Edit button.
Once the A record is properly configured, the DNS information will begin to propagate. This could also take a few hours, so remain patient. Once it has, the add on domain will be publicly accessible.
I’ve set up my add on domain! Now what?
Now we make a website about cats.
Main Article link Here