1. Log into your cPanel account.
2. In the Domains section, click on the Domains icon.
3. Enter your sub-domain name under the Domain field and select Just use "test.primarydomain.com". (primarydomain.com should be your actual domain name.)
If you want to create a sub-domain for an addon domain, then enter test.addondomain. (addondomain should be your actual domain name). You need to specify the addon domain name folder after /public_html/ field.
Leave all fields as they are autofill.
Uncheck " Share document root (/home/username/public_html) with . " if it is checked.
4. Click on the Submit button.