How to list Subdomains, Addon and Parked domains of a cPanel account via command line

We all know how to list subdomains/addon domains under an account after logging to cPanel of that user. But it is a bit time consuming to log in and browse between options. There is a better and faster way to list all addon/parked and subdomains of a cPanel user provided you have SSH root access to the server.

In a cPanel server, all user configurations are stored/saved in  /var/cpanel/userdata/ inside a directory with the cPanel username of the user. ie for the cPanel user user123, the userdata directory will be ‘/var/cpanel/userdata/user123’ Now inside this directory, there will be a file ‘main’ which lists all there you can see all the domain associated with that particular cPanel account.


root@server [~]# cat /var/cpanel/userdata/user123/main



parked_domains: []








When you check, be sure to replace ‘user123’ with the username of the cPanel account in question.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.