How To Properly Manage Addon Domains In cPanel

It is easy to add additional domains in cPanel, but you have to create the directory in the correct place and manage the redirection correctly in order to avoid duplicate data.

If you have any form of website, chances are you have paid for hosting. If you are anything like me, then the chances are also that you find hosting to actually be quite expensive. If blogging is a hobby or if you are just getting started then hosting is a significant outlay.

If you want to have a second website and you want to use your existing hosting account to host this additional domain then you need to know how to properly manage addon domains In cPanel.

Why? Because of Google mostly. Actually all search engines, but mostly Google. It all comes down to the fact that duplicate data is a problem on the web and will be penalised. Addon domains are sub directories created in your hosting account and can possibly be accessed from more than one URL. If this happens then your new site will be seen as duplicated and you’ll run into all sorts of problems.

The solution is easy and twofold.

Create Your Sub Directory Above Public_html

What does this mean? Take a look at your cPanel file manager. You’ll see that you have a ‘home’ directory, which you can set, but will usually be something like /home/accountname. Take a look at my file manager from cPanel on Hostgator:

A Properly Located Addon Domain Sub Directory

You can see that my home directory is /home4/accountname/ and underneath that are my top level directory files. The public_html directory is where the main account is located. If you looked in there you would see a Worpress installation. Most importantly note where the relce.net directory is located – NOT in public_html, but one level above. This website is set up as an addon domain.

Why Directory Placement is Important

Let’s imagine for a moment that my account name is ‘richard’ (it isn’t), and that I have the domain originaldomain.com (I don’t). So, my home directory is /home4/richard, and this contains the WordPress installation for www.originaldomain.com.

Now I create an addon domain called ‘newdomain’. It is a peculiarity of cPanel that if the sub directory newdomain is created inside public_html, then it will be available as a sub folder of originaldomain.com, ie, available at originaldomain.com/newdomain.

Creating the directory for newdomain in the home folder, but above public_html will prevent this. It will also prevent the duplication of all of your content for newdomain.com inside originaldomain.com/newdomain.

The Difference Between A Sub Domain and An Addon Domain

A sub domain is a sub section of a website. Often sub domains are created to separate completely distinct sets of content that belong under the same umbrella. An example might be a company that has a website (company.com) and a blog. The blog is created as a sub domain at blog.company.com.

An addon domain is a completely different domain. The addon domain and the main domain exist as completely separate entities. One may visit one domain without even knowing the other exists. This website is an example.

Correctly Redirect The Sub Domain

Once you’ve created your addon domain, you still have an issue.

In cPanel, take a look in the ‘Sub Domain’ section. You will see your newly created addon domain.

Your content is now available at newdomain.originaldomain.com AND newdomain.com. That’s still a problem.

In the ‘Modify A Subdomain’ section, click on ‘Manage Redirection’ for the subdomain newdomain.originaldomain.com and redirect it to newdomain.com.

Remember to use a ‘www’ or omit it, depending on your preference in your WordPress installation and which site you have selected as your canonical site.

301 Redirect

What you have just done is create a permanent redirect from the subdomain to the top level domain. You are telling search engines ‘Not here – there’

Now, your content is only available in one place. It’s not duplicated and it is hosted with your main website. You can do this as many times as your hosting provider allows – just make sure you redirect each new site to the correct location