Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    51
    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,608
    Likes Received:
    32
    Trophy Points:
    238
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jcevallos

    jcevallos Registered

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

    It was really helpful
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice