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.

Main domain and subdomain on different IP-addresses?

Discussion in 'General Discussion' started by Vliegtuig, Apr 28, 2010.

  1. Vliegtuig

    Vliegtuig Well-Known Member

    Joined:
    Jan 21, 2010
    Messages:
    74
    Likes Received:
    2
    Trophy Points:
    6
    Hi,

    Is it possible to create an addon domain on a different IP-address than the main account IP?

    If not, how can I circumvent this?

    Our client already has companyname.com but we are currently working on a system that requires a seperate SSL & IP on a different subdomain, for example app.companyname.com.

    Any help is appreciated.

    Thanks in advance.
     
  2. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Currently, the only way to do this is to create the subdomain as its own cPanel account. For example, instead of adding app.companyname.com as a subdomain to the account for companyname.com, create a new cPanel account and enter app.companyname.com as the domain. You can then assign the subdomain's account its own IP address and install an SSL certificate.
     
  3. kuldeep_

    kuldeep_ Well-Known Member

    Joined:
    Apr 24, 2010
    Messages:
    54
    Likes Received:
    0
    Trophy Points:
    6
    If you have single account and not reseller, In this case you will not be able to add domain subdomain app.companyname.com as individual domain.


    So in this case you can add subdomain app under your domain companyname.com and then ask your host provider to assign dedicate IP for subdomain app.companyname.com

    They can assign IP address from WHM >> Main >> DNS Functions >> Edit DNS Zone >> select domain name companyname.com and change 'A' record for subdomain to dedicated IP address.

    Also assign same ip address for subdomain in httpd.conf file.
    Doing this will have dedicated IP for your domain.
     
  4. cPanelJared

    cPanelJared Technical Analyst
    Staff Member

    Joined:
    Feb 25, 2010
    Messages:
    1,842
    Likes Received:
    18
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    While the method suggested by kuldeep_ will work, I need to mention that editing the httpd.conf file directly is discouraged. Changes made directly to httpd.conf will not be preserved when cPanel or Apache is updated. Instead, the Apache configuration should be modified using include files and templates. The following section of our documentation explains this in detail:

    CustomDirectives < EasyApache3 < TWiki

    That said, the way to host a subdomain on its own IP address that we currently officially support is to create the subdomain as its own cPanel account, separate from the main domain's cPanel account.
     
  5. Indianets

    Indianets Well-Known Member

    Joined:
    Jun 13, 2008
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hello,

    Sorry to reply in an old thread. But currently I am facing some issues with this. I have been using sub-domains with different cPanel accounts for long without any issue having dedicated IPs and SSL certificates with them.

    The problem with this config is sub-domains create their own bind zone db. Is there any way to prevent a cPanel account (with sub-domain here) to create it's own zone db? I tried deleting the zone file, but this may not be the best way to do it, as this can break the configs and/or may create issues in clustered env.

    Of course, I have custom entry in the main domain's zone file hosted on the same server. The real problem is when you dig to the authoritative nameservers, they return the subdomain's db and NS & SOA records are not what you intend to serve. If you dig to a non-authoritative nameservers, there shouldn't be a problem. But I am more inclined to perfection and want this to work my way.

    Any input would be appreciated.

    - Vijay
     
    #5 Indianets, Jan 13, 2011
    Last edited: Jan 13, 2011
Loading...

Share This Page