Domains and Sub-domains are widely used in any company, institution to give access to all the users rather than a single admin it will be very useful imagine there’s a college they are working on a student College Project so they all so they have to create various accounts for a demonstration I am creating 4 accounts
Also that there will be no confusion. admin subdomain account contains only files related to the admin and vice-versa to all. To start I have to log in to my Cpanel account and click on the subdomain option if it is not showing then type on the search bar on the top and click on it now you can see the create a subdomain page in which you have
- Document Root
Fill the all the details for example for a sub-domain I am entering the admin and which is under gwwdemosites if you have multiple domains then it will show many and for document root select the folder in which you are creating then enter the create Button you will get a green box as success congrats you have created the first subdomain likewise you create all 4 subdomains (admin, teacher, student. Board) as shown in the below image
Hosting a static website in a sub-domain
To host a static website under the sub-domain which have already created(student subdomain), if you have the static file with you it’s good or you can download it online there are many websites which offer free code.. the first login to the Cpanel and click on file manager and select which folder which you want to upload the files delete if any files then click on the folder
Enter the folder and click the upload button which on the top bar then select the HTML code file(zip file) and select file and if the bar turns green you have successfully uploaded the files and you can see the file has been uploaded
Unzip the file by right-clicking you will get the option and click EXTRACT now you can Extract the files successfully
Select all the files. you can change the location of the files directory by selecting all and click move below the search bar. you can edit the location of the folder after entering the students.gwwdemosites.com. you will get your site like this. a site has uploaded under the student sub-domain.
if you still have any doubts then please feel free to mail us at firstname.lastname@example.org.