If you’re trying to install an SSL on your hostname through WHM you may be encountering this error:

_get_vhost_data_structs could not fetch vhost hash

There are two common fixes for this error.

The first is simple: Make sure you hostname is a FQDN, or fully qualified domain name. That means it needs to have three parts:


Without all three there are many things that can make WHM and cPanel unhappy.

The second is slightly more complicated. First, ssh into your server, and run this command:

[~]# hostname

The output that you see there should be very close to the output that you get from this command:

[~]# grep main_domain  /var/cpanel/userdata/nobody/main

For example on one of our servers it looks like this:

[~]# hostname
[~]# grep main_domain  /var/cpanel/userdata/nobody/main
main_domain: host.encylia.com

If you find that the contents do not match, backup that file to a different directory:

cp /var/cpanel/userdata/nobody/main /root/

and then change that line. You should then be able to add the SSL without a problem.