Skip to main content

Assign IP Address to Subdomain

Comments

24 comments

  • cPanelMichael
    Hello, We recently removed the documentation on how to setup a dedicated IP address for an addon domain name or subdomain, as it's no longer supported. Can you let us know why you need to assign a dedicated IP address to the subdomain so we can provide a potential alternative? Thank you.
    0
  • Matt Kachurak
    Well, in short, because my client has a primary domain on the server (cpanel domain) but also has an addon domain in the same cpanel. There's no way, to my knowledge, to assign an IP (for SSL purposes) to that domain. She needs an SSL, which she is purchasing, to be assigned to that addon domain. If you can derail how to assign an IP to anot addon domain without assigning the ENTIRE account (primary domain) the IP, I'll be happy to do so. OR without causing the customer to have a separate cpanel account for that domain.
    0
  • cPanelMichael
    Hello, Dedicated IP addresses are not required for SSL certificates, as SNI allows for separate certificates installed on the same IP address: SSL FAQ and Troubleshooting - Documentation - cPanel Documentation Thank you.
    0
  • dr1ss
    Nowdays a lot of hosting companies can provide ip addresses from all over the world and bind them to the same server. Don't know if there is any SEO expert on the forum, but it would be great to know if the ip address can affect the ranking of a website. Imagine someone with multiple domains in the same account. domain1.com for the usa market, domaine2.com for france market etc... The question is if the ranking can be improved by linking each domain to an ip address of the targeted country. (domain1.com = us ip address, domain2.com = french ip address etc..)
    0
  • dbrookeJP
    I too am trying to set an IP address of an Add-on domain.
    0
  • cPanelMichael
    New I too am trying to set an IP address of an Add-on domain.

    Hi, It's unsupported, but we might be able to offer an alternative solution to a separate IP address. Could you let us know the specific reason you'd like to do this? Thank you.
    0
  • dbrookeJP
    Thanks, I have a magento store that utilizes the same directory for their 'multi-website' setup. I am setting magento up to have different I.P. address for all the websites / stores. I can't remember the exact reason I am doing that, but I think it had something to do with setting up different back-ends / admins for each store. Donovan
    0
  • cPanelMichael
    Hello, There's no longer support for using separate IP addresses for addon domain names. Previously, this was necessary for SSL certificates but it's no longer required since all supported systems offer SNI. Let us know of any specific issues you encounter with the Magento setup when using the same IP address. Thank you.
    0
  • dbrookeJP
    Well, thanks for the quick response??? I guess I'll start a new thread with specific questions... because something this easy should not be so hard.
    0
  • cPanelMichael
    Well, thanks for the quick response??? I guess I'll start a new thread with specific questions... because something this easy should not be so hard.

    Hi @dbrookeJP, We only support separate IP addresses on a per-account basis, not a per-domain basis. A workaround was offered in the past, however it is no longer offered due to changes in how we process an account's userdata files. Thank you.
    0
  • dbrookeJP
    Michael, I don't see why this is unsupported. However, I have a working configuration now. Below I will state the case of what I needed and my situation. I will also state what I did to make it work. I had two accounts set up 'domain1.com' and 'domain2.com'. I am setting up a magento store, which allows one to setup multiple stores ( and websites ) given that you can use the same directory of files. I set up this store initially on domain1 (store.domain1.com). However, I needed to set up a store for domain2 as well. These two stores needed unique I.P. addresses. Here is what I did. 1.) Create Add-On domain in domain1.com. domain = store.domain2.com subdomain = anything path = 2.) edit DNS zone (I used WHM) to point to the new I.P. Address. 3.) edit the apached config, change to new I.P.: /var/cpanel/userdata// (note: I had to edit the document root path as well.. for some reason it did not include 'public_html') 4.) delete cache, main.cache, .cache 5.) Rebuild apache config (You can do this now, or if you have SSL, do this later.) /scripts/rebuildhttpdconf service httpd restart If you have SSL (which is auto-these days) 6.) click WHM -> SSL/TLS -> Manage SSL Hosts Look for your domain, if found, I had to delete it and do SSL manually. 7.) After deleting the host, you will want to install an SSL cert manually. you may need to first go back to your apache user directory and delete any instances of your SSL first. a.) delete: /var/cpanel/userdata// b.) delete SSL cache files, if any. c.) Rebuild apache (see: step 5) 8.) Generate a new CSR (WHM -> SSL/TLS -> Generate an SSL Certificate and Signing Request ) 9.) Install the new Certificate (WHM -> SSL/TLS -> Install an SSL Certificate on a domain ) a.) Make sure to assign the right I.P. address in this step. 10.) double check the apache userdate that was created. /var/cpanel/userdata// a.) Make sure document root is correct (mine was missing 'public_html') b.) Make sure the I.P. address is right. c.) Rebuild apache config (see: step 5) 11.) This should all work now. You can now look at WHM -> SSL/TLS -> Manage Hosts to double check your domain has a record and the right I.P. address. 12.) I turned off autoSSL for the add-on domain because I don't know how it works and didn't want it to overwrite anything. Disclaimer: Michael noted that this is unsported (which I can't fathom why), so it is probably not recommended you do this. I am doing it out of necessity. Michael, feel free to chime in with any corrections.
    0
  • cPanelMichael
    Hi @dbrookeJP, Thank you for sharing your workaround. Note the reason it's unsupported is because it will result in the AutoSSL error reported on the following thread: Unrecognized vhost: example.com Thank you.
    0
  • dbrookeJP
    Perhaps a more elegant way to deal with this is to fix the issues regarding autoSSL, and re-establish the documentation? I understand my situation may be a more rare case, but even with SNI, I think there are valid reasons to support unique IP addresses in Add-On domains. Just a suggestion. Thanks!
    0
  • cPanelMichael
    Hello, A feature request is the best approach if you'd like to see it supported. I encourage you to open a feature request for the ability to assign separate IP addresses to addon domain names: Submit A Feature Request Thank you.
    0
  • dbrookeJP
    Okay. Done. I hope people go here and "like" it! Accomodate Unique IP addresses for Add-on domains
    0
  • imageinabox
    I don't understand why cPanel is making this decision for all of us. If we need to assign a dedicated IP address to a subdomain (add-on domain, or whatever) we should be able too. This shouldn't be limited to only IPv4. We should able to assign a dedicated IPv4/6 to an addon domain, subdomain, etc.. Manually assigning the IPv4 worked (via the userdata) in the past so I don't see why they would remove this feature. Unique IP address also help with RDNS look ups, email deliverable, and more.
    0
  • cPanelMichael
    Hi @imageinabox, We appreciate your feedback. I encourage you to vote and comment on the feature request referenced in the post before yours once it's approved. Note that this functionality was never officially supported. We simply offered workaround instructions on how to implement it. Thank you.
    0
  • imageinabox
    Hey @cPanelMichael thanks for the follow up. I've already voted it up. I'll add a comment about IPv4/6 support.
    0
  • dbrookeJP
    [snip] Accomodate Unique IP addresses for Add-on domains

    Hello, just an update. This request has been approved. It will get more attention the more interest it gets, so... if you want cPanel to be able to allow multiple IP's in subdomains / add-ons, please follow the link and vote for it. - Donovan
    0
  • Manu CLT
    HI
    Michael, I don't see why this is unsupported. However, I have a working configuration now. Below I will state the case of what I needed and my situation. I will also state what I did to make it work. I had two accounts set up 'domain1.com' and 'domain2.com'. I am setting up a magento store, which allows one to setup multiple stores ( and websites ) given that you can use the same directory of files. I set up this store initially on domain1 (store.domain1.com). However, I needed to set up a store for domain2 as well. These two stores needed unique I.P. addresses. Here is what I did. 1.) Create Add-On domain in domain1.com. domain = store.domain2.com subdomain = anything path = 2.) edit DNS zone (I used WHM) to point to the new I.P. Address. 3.) edit the apached config, change to new I.P.: /var/cpanel/userdata// (note: I had to edit the document root path as well.. for some reason it did not include 'public_html') 4.) delete cache, main.cache, .cache 5.) Rebuild apache config (You can do this now, or if you have SSL, do this later.) /scripts/rebuildhttpdconf service httpd restart If you have SSL (which is auto-these days) 6.) click WHM -> SSL/TLS -> Manage SSL Hosts Look for your domain, if found, I had to delete it and do SSL manually. 7.) After deleting the host, you will want to install an SSL cert manually. you may need to first go back to your apache user directory and delete any instances of your SSL first. a.) delete: /var/cpanel/userdata// b.) delete SSL cache files, if any. c.) Rebuild apache (see: step 5) 8.) Generate a new CSR (WHM -> SSL/TLS -> Generate an SSL Certificate and Signing Request ) 9.) Install the new Certificate (WHM -> SSL/TLS -> Install an SSL Certificate on a domain ) a.) Make sure to assign the right I.P. address in this step. 10.) double check the apache userdate that was created. /var/cpanel/userdata// a.) Make sure document root is correct (mine was missing 'public_html') b.) Make sure the I.P. address is right. c.) Rebuild apache config (see: step 5) 11.) This should all work now. You can now look at WHM -> SSL/TLS -> Manage Hosts to double check your domain has a record and the right I.P. address. 12.) I turned off autoSSL for the add-on domain because I don't know how it works and didn't want it to overwrite anything. Disclaimer: Michael noted that this is unsported (which I can't fathom why), so it is probably not recommended you do this. I am doing it out of necessity. Michael, feel free to chime in with any corrections.

    Is it approved by Cpanel ,
    0
  • cPanelMichael
    Is it approved by Cpanel

    It's unsupported due to it's incompatibility with the AutoSSL feature. Thank you.
    0
  • Tomas Gonzalez
    Okay. Done. I hope people go here and "like" it! Accomodate Unique IP addresses for Add-on domains

    Hi. This request was lost. I believe the most similiar request now would be the following: True Multi Domain Support (Multiple Certificates & IPs per Acct) I've just voted it. Actually, what I need is to be able to set up reverse DNS for subdomains. This is for email to comply with "SMTP Reverse DNS" on my email.domain.com subdomain.
    0
  • dbrookeJP
    Hi. This request was lost. I believe the most similiar request now would be the following: True Multi Domain Support (Multiple Certificates & IPs per Acct) I've just voted it. Actually, what I need is to be able to set up reverse DNS for subdomains. This is for email to comply with "SMTP Reverse DNS" on my email.domain.com subdomain.

    sigh... always hate it when time-intensive thought get's wasted. I'll vote for this one then.. and maybe add a comment there to point to this thread.
    0
  • Exmoond
    Nowdays a lot of hosting companies can provide ip addresses from all over the world and bind them to the same server. Don't know if there is any SEO expert on the forum, but it would be great to know if the ip address can affect the ranking of a website. Imagine someone with multiple domains in the same account. domain1.com for the usa market, domaine2.com for france market etc... The question is if the ranking can be improved by linking each domain to an ip address of the targeted country. (domain1.com = us ip address, domain2.com = french ip address etc..)

    subdomain with individual IP is treated in SEO as separate domain, so for the SEO purposes individual IP for a subdomain is really important, because thanks to that you can position your domain way higher
    0

Please sign in to leave a comment.