setting up subdomain only cpanel account

mattcampbell

Member
Sep 7, 2006
16
0
151
Hi everyone,

This one may be a challenge.

I would like to setup a subdomain only account on my WHM host server. Let me explain.

I have WHM setup on my server. The host name of the server is say host.mysite.com.

At the moment typing www.mysite.com or mysite.com into a browser doesn't resolve anything. Only typing host.mysite.com (the server hostname) will show the default cpanel page about a site not existing.

I want to create a cpanel account based on the mysite.com domain so that only subdomains will resolve. This is so I can create subdomain services - eg syndication.mysite.com but if people visit www.mysite.com or mysite.com I don't want anything to resolve - I want it to stay as it is now.

The problem is I don't want to create seperate cpanel accounts for all of my subdomains. I want to be able to create 1 cpanel account with all the subdomains in it.

Summary:

www.mysite.com - not resolve anything (same as current)
mysite.com - not resolve anything (same as current)
host.mysite.com - show default cpanel page (same as current)

sub1.mysite.com - resolve to subdirectory created in cpanel account
sub2.mysite.com - resolve to subdirectory created in cpanel account
sub3.mysite.com - resolve to subdirectory created in cpanel account

Anyone got any ideas? As i said I know the seperate subdomain cpanel accounts can be created but I want them all in the same cpanel account.

Thanks
 

mich181189

Member
Jul 31, 2005
12
0
151
it's much easier than that - create an account for the first subdomain, then add the others as addon domains. Or, use a (php) redirect on the main domain.
 

mattcampbell

Member
Sep 7, 2006
16
0
151
Where do you control the virtual host in WHM? Ie. how do you control whether the www or blank resolves to the site?

Is creating addons from one subdomain the only way?