Sometimes on a cPanel server the /etc/userdomains (which contains list of all the domain added on the server) appears blank even if all the domains exist on the server.
Run the following command to rebuild the file on the server:
/scripts/updateuserdomains
That’s it. You can now view the list of domains in this file.