Creating Addon Domain for Site Hosted Elsewhere in cPanel

Trying to set up a site as an addon domain before moving it from another hosting account? You may get mooned by cPanel in such cases. Here is there error you see and (more importantly) how to fix it.

When you try to set up the addon, you get this message:

There was a problem creating the addondomain. Show Details

Error from park wrapper: Using nameservers with the following IPs: xx.xxx.xxx.xxx,xx.xxx.xxx.xxx Sorry, the domain is already pointed to an IP address that does not appear to use DNS servers associated with this server. Please transfer the domain to this servers nameservers or have your administrator add one of its nameservers to /etc/ips.remotedns and make the proper A entries on that remote nameserver.

In order to eliminate this error, go into WHM. In Server Configuration, under Tweak Settings option, check this box:

Allow Creation of Parked/Addon Domains that resolve to other servers (i.e. domain transfers) [This can be a major security problem. If you must have it enabled, be sure to not allow users to park common internet domains.]

Once you’ve created the addon domain, you can untick this box again. It’s more secure to leave it unchecked, of course, but many times you’ll want to get the new site up and running before you change over DNS, huh? At least, if you’re smart, you do.
photo credit: bwright923

Share Button

Hosting Subdomain on a Different Server than Main Domain

There may be times where you want to host a subdomain on a different server than the main domain. To accomplish this, you need an A record, added either at the domain registrar if possible, or the server that hosts mydomain.com.

sub.mydomain.com. 14400 IN  A  XXX.XXX.XXX

The X’s should be replaced by the target server’s IP address. I prefer changing this info at the domain record level, since that doesn’t require cooperation of the main domain’s host, and thus can be changed by the domain owner in the event the target server’s IP changes.

For this to work, the subdomain MUST be added to the target server. A very simple way to do this is to add the main domain as an Addon in cPanel, and then set up the subdomain which will add all the relevant DNS entries (even though the main domain is not actually hosted on the target server). ((Caveat – I’ve found you may see occasional weirdness, though, with the approach described, such as a WordPress installation that requires uploads to go straight to the upload folder to work, instead of month and year-based folder settings. Would probably be better to add the subdomain to your server configuration directly for long-term robustness.))

Share Button