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.

New cPanel account with domain and all subdomains

Discussion in 'General Discussion' started by jcevallos, Jan 11, 2012.

  1. jcevallos

    jcevallos Registered

    Joined:
    Jan 11, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I want to create a new account which manages a domain and ALL its subdomains.

    If my domain is ab.xy, I'd like to create it with domain "*.ab.xy". I know it's not allowed, but what's the best/official way to do this?

    I'm creating a site which has a short domain and allows users to shorten any URL. But it won't return common short URL in format ab.xy/asdf but instead asdf.ab.xy. I want all subdomain to be handled by this same cPanel account and my PHP script will detect full URL/subdomain so it knows where to redirect.

    Thanks for your help.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You should be able to create a wildcard subdomain in cPanel > Subdomains area using *.ab.xy as the subdomain name.

    You should also be able to use mod_rewrite rules in the account's /home/username/public_html/.htaccess file to perform redirects to that wildcard name. Of note, here username would be the cPanel account username.
     
  3. jcevallos

    jcevallos Registered

    Joined:
    Jan 11, 2012
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Thank you!

    It was really helpful
     
Loading...

Share This Page