Knowledgebase
Restrict subdomain access to addon domains
Each Addon Domain requires a subdomain. Using mod_rewrite you can stop people from being able to use the addon domain as a subdomain of the primary domain
Preventing use of the Subdomain
Put this in the .htaccess file located at the subdomains folder, changing the subdomain, primarydomain.com and addondomain.com:
RewriteEngine On RewriteCond %{HTTP_HOST} ^subdomain.primarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^www.subdomain.primarydomain.com$ [OR] RewriteCond %{HTTP_HOST} ^addondomain.com$ RewriteCond %{REQUEST_URI} ^/$ RewriteRule ^(.*)$ http://www.addondomain.com/ [R=301,L]
Also Read
Step-by-Step Guide to Migrate Your WordPress Site to a New Host | Vcclhosting
11255
How to update your cPanel Contact Information or receive a notification on reaching quota limit?
6776
How to Change cPanel Style/Theme?
7267
How to Edit file in the cPanel File Manager?
6383
How to Change Language of your cPanel?
5346