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

Parking a Domain on top of An Addon Domain (cPanel)

Parking a domain on top of an addon domain in cPanel can be a quick, easy way to change the domain on a site without mussing with files or database connections and the like. If you’re using a database-driven site, however, be sure to make the relevant changes to the database.  ((Thanks to Hostgator Support for this helpful info.))

  1. Login to cPanel and click Addon Domains–and not parked domains.
  2. In the field to the right of “New Domain Name,” type the domain name you wish to park on top of your addon domain
  3. Click outside the text box and your other settings will populate.
  4. Under “Document Root:” remove everything except “public_html”
  5. Look down to your current addon domain and its “Document Root” – normally a folder named after the original domain.
  6. Take the “Document Root” and insert it in the field to the right of “Document Root:” at the top.
  7. Insert any password in the password field. (You won’t need to remember this password, so just use the Generate Password button.)
  8. Click Add Domain
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

cPanel /WHM Server Default Parking Page

To set up a default parking page for cPanel/WHM server, you need to place your default files in the proper place.

Check /usr/local/apache/htdocs for when a domain resolves to your server but does not actually exist in the Apache configuration file. If you just need a park page set up you can place it in that directory and name it index.php, index.html, etc.

As always, your configuration may vary.

Share Button

Setting Up Wildcard DNS for WPMU on cPanel

Allowing people to set up blogs for WordPress MU at blog.domain.tld requires installing your WPMU in the site root and setting up wildcard DNS. In setting up my first WPMU, I ran across this tutorial by Matt Mullenweg of WordPress fame, linked from the WordPress MU docs.

Since I’m not the queen of DNS or anything, I checked with my admin folks to make sure I got the Virtual Host entries correct. I found out this is extremely easy to do if you have a cPanel setup.

Here’s How from my SysAdmin:

To add wildcard DNS and vhost settings in one swoop, simply add a new sub domain to the account and name it ‘*’ (the asterisk character). Make sure it’s document root is pointed to the same directory that your WordPress MU is setup in and cPanel will add everything else to all of the configuration files.

Sure enough, worked like a charm, took 30 seconds, and didn’t require anything scary like restarting Apache–there is no time that runs slower in the time-space continuum than waiting for httpd to restart, man.

Share Button

WHM SSL Certificiates

You can install regular SSL certificates to replace the self-signed copies that come with WHM (and therefore eliminate error warnings the customers receive using Webmail, cPanel, etc.).

In WHM to install your cert for WHM/cPanel services, you will need to use the link “Manage Service SSL Certificates” under Service configuration in your WHM. This will allow you to install certificates to different services such as mail and WHM.

These SSL Certificates won’t require a unique IP address because they are stored in a different area that the other security certificates.

Share Button