Matt Kachurak

Registered
Jan 30, 2017
2
0
1
Syracuse, NY
cPanel Access Level
Root Administrator
I am posting this to clarify whether or not a subdomain can be assigned an IP address. I've tried searching the documentation and all results come up as "no longer available."

I did find these instructions online and want to confirm whether this is or is not the process and method to go about doing this: (original page: ndimensionz.com/kb/dedicated-ip-to-parked-addon-domain-in-cpanel/
How to add dedicated IP to parked/addon domain in cPanel)
  1. Edit DNS zone of addon to point it to the new IP and also change the subdomain IP to that same IP. This can be done from WHM.
  2. Edit the file /var/cpanel/userdata/username/subdomain.domain.com file, change the IP and save it.
  3. # /scripts/rebuildhttpdconf
  4. # service httpd restart
Thank you.
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

Matt Kachurak

Registered
Jan 30, 2017
2
0
1
Syracuse, NY
cPanel Access Level
Root Administrator
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.
 

dr1ss

Registered
Nov 2, 2017
2
0
1
Morocco
cPanel Access Level
Root Administrator
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..)
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

dbrookeJP

Active Member
Aug 24, 2016
28
1
3
Wisconsin
cPanel Access Level
Root Administrator
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

dbrookeJP

Active Member
Aug 24, 2016
28
1
3
Wisconsin
cPanel Access Level
Root Administrator
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 = <path to magento root>

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/<domain1 usernmae>/<yourconfig>
(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, <yourconfig>.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/<domain1 usernmae>/<yourSSLconfig>
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/<domain1 usernmae>/<yourSSLconfig>
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.
 

dbrookeJP

Active Member
Aug 24, 2016
28
1
3
Wisconsin
cPanel Access Level
Root Administrator
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!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.
 

imageinabox

Member
Nov 20, 2013
21
2
3
Huntsville, AL
cPanel Access Level
Root Administrator
Twitter
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.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,258
463
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.