SiteCozy

  • My account

How to get rid of the alternate URLs paths in Cpanel for an addon domain

2018-08-30

In Cpanel, it is possible to access a URL using the primary domain and an addon domain as a subfolder or a subdomain just like below.

  • http://2nddomain.com
  • http://2nddomain.your1stdomain.com
  • http://your1stdomain.com/2nddomain.tld/
  • https://2nddomain.tld
  • https://2nddomain.your1stdomain.com
  • https://your1stdomain.com/2nddomain.tld/

To prevent a URL to be accessible from the primary domain, here is the procedure to follow

  1. Backup the website content (public_html folder) of your primary domain
  2. Disable the autoSSL feature for the primary domain in Cpanel.
  3. Replace the primary domain with a dummy domain name. You must have access to the nameserver settings of this domain name. Ask you Cpanel admin or if you have access to WHM follow this procedure.
  4. Add your former primary domain name as an addon domain and map the folder to the existing folder where the content of your primary domain was stored.
  5. Change the nameservers of your former primary domain and make it point to something else than your web server.

Now you will get the following and it is good.

  • http://2nddomain.com
  • http://2nddomain.your1stdomain.com => not accessible
  • http://your1stdomain.com/2nddomain.tld/ => not accessible
  • https://2nddomain.tld
  • https://2nddomain.your1stdomain.com => not accessible
  • https://your1stdomain.com/2nddomain.tld/ => not accessible

Related Posts:

  • How to install an additional domain in Cpanel?
  • The Cpanel WHM review - 2018 -
  • Create a subdomain in Cpanel - tutorial & explanation
Download our Broken link checker freeware here Buy a license key for the Sitecozy broken link checker

Customer Login

Lost password?

Categories

  • Webmaster advice
  • SEO advice
  • Web hosting
  • SiteCozy link checker KB
  • WordPress theme & plugin reviews
  • All articles
Disclosure: We are a professional review site that receives compensation from the companies whose products we review. We test each product thoroughly and give high marks to only the very best. We are independently owned and the opinions expressed here are our own.

Copyright Sitecozy 2018