Subdomain fall-through behavior


Subdomains created within the control panel via WebSubdomains will map to corresponding document roots. Subdomains not explicitly defined under Web > Subdomains, called a fall-through, will always serve content from your primary domain located under /var/www/html.

Example: assume maps to /var/www/web, and is the main domain that serves content from /var/www/html. “web” is the only subdomain associated with the account.

  • will serve content from /var/www/web
  • will serve content from /var/www/web
  • serves content from /var/www/html
  • or will serve content from /var/www/html (fall-through behavior)


To stop this behavior, create a .htaccess file under /var/www/html with the following lines:

RewriteEngine On
RewriteCond %{HTTP_HOST} !^(www\.)? [NC]
RewriteRule .* - [R=404,L]

Substitute with your actual domain name.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.