The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Auto provision sub-domains

Discussion in 'General Discussion' started by Tyler Jacobson, Jun 23, 2011.

  1. Tyler Jacobson

    Joined:
    Aug 22, 2008
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    1
    This may be an elementary question and I apologize upfront if it is:

    Let's say I have a hosting company called staymommy.com. I'd like to have things setup to where a user is automatically provisioned the sub domain of username.staymommy.com that points to their provisioned server space. Is this possible? If so, is there a walkthrough on setting this up?

    Thanks in advance.
     
  2. nimrodx

    nimrodx Active Member

    Joined:
    Jul 24, 2005
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Edinburgh, Scotland
    I don't think cPanel can do this for you - you'd need some kind of script to modify the DNS for your main domain name. You could look in to some kind of script plugging in to the cPanel API. Most likely you want this plugged in to whatever account management system you have in place.
     
  3. hgrg

    hgrg Well-Known Member

    Joined:
    Oct 4, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    easiest way:
    1 readd the domain with a dedicated ip address
    2 add a wildcard dns to the domain
    3 place a rewrite script (php/htaccess) to the domains folder.. of course a much more sophisticated way would be if you would add subdomains with a script..

    (try this for subdomain creation: http://www.zubrag.com/scripts/cpanel-subdomains-creator.php )

    but you shouldnt use cpanel password unencrypted in an url
     
    #3 hgrg, Jun 24, 2011
    Last edited: Jun 24, 2011
Loading...

Share This Page