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.

Subdomains for all parked domains

Discussion in 'General Discussion' started by GoWilkes, Dec 2, 2013.

  1. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I have 104 domains parked on top of a main domain, and I'm wanting the same subdomains to work for all of them.

    Meaning, beta.parked.com should show the same thing as beta.example.com.

    I thought that this was working before, but it's not working now. I haven't changed anything in my configuration in months, so I don't know if I'm wrong that it was ever working, or if something changed in cPanel/WHM.

    Other than setting up 104 subdomains manually, is there a way for me to make all of the parked domains recognize the subdomains (the same way that "Domain Forwarder" does for emails)?

    TIA!
     
  2. GoWilkes

    GoWilkes Well-Known Member

    Joined:
    Sep 26, 2006
    Messages:
    367
    Likes Received:
    1
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    Update:

    From what I can tell, this should be done by editing httpd.conf; find the VirtualHost for the subdomain that's been created, then add a ServerAlias:

    Code:
    <VirtualHost 123.45.67.89:80>
      ServerName beta.example.com
      ServerAlias www.beta.example.com
    
      # add this
      ServerAlias beta.parked.com www.beta.parked.com
    
      # leave everything else in this section alone
    </VirtualHost>
    
    Then, update /etc/userdomains, adding one line for each new subdomain to the next-to-last line:

    Code:
    beta.parked.com: example     # where "example" is the main account name
    beta.parked2.com: example
    beta.parked3.com: example
    *: nobody                          # this is the default last line
    
    Is there anything else that needs to be done?

    FWIW, I'm using Redhat Enterprise 5.10 x86_64 standard, WHM 11.40.0 (build 19).
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page