You are trying to access a website with the main domain, but only the index of/ directory list appears? That means you must first move the website from a subfolder to the public_html directory.

So, how do you move the website to the main domain so that it looks normal again?
Don’t worry, you’re in the right article! Here, we’ll take you to learn how to quickly move website files from subfolders to document root.
Already want to practice directly? Come on, immediately see the full tutorial below!
How to Move Website to Main Domain
How to move a website from a subfolder to the main domain consists of the following 7 steps:
- Login to cPanel
- Choose the FileManager Menu
- Access the public_html Directory
- Selects All Files in the Websites Subfolder
- Moving Files to the public_html Directory
- Delete the Websites subfolder
- Testing Websites
Come on, discuss the steps one by one!
1. log in to cPanel Account
How move a website to the main domain can be started by logging into cPanel. You can open cPanel according to the URL when registering for the hosting service.
Then, click on the View All cPanel Features button which will take you to the cPanel menu page.

2. Select Menu File Manager
In cPanel, you can select the File Manager menu in the Files category.

3. Access the public_html Directory
In the File Manager menu, select the public_html directory.

Then, open the subfolder that is inside the public_html folder. For example, in this tutorial, our subfolder is called WordPress.

4. Select All Files in the Websites Subfolder
Before starting to move the website out of the subfolders, find the index.php or index.html files. If both are in the folder, you are in the right folder.
Please check Select All to select all files, as shown in the following image:

5. Move the Files to the public_html Directory
Move all the subfolder files to the main domain by right-clicking on the blocked area and selecting Move.

After the popup window appears, input the destination directory in the column provided. To move files to the main domain, select the /public_html guide, and click Move Files.

6. Hapus Subfolder Website
After all subfolder files have been successfully moved to the document root, you can return to the public_html folder.
The next step is to delete the files and folders listed in the Index of/.
In our example, the file in question is WordPress-5.8.1.zip and the WordPress folder is empty. Delete both items by right-clicking and selecting Delete.

What needs to be remembered, one of the most important steps in how to move a website to the main domain is to make sure the completeness of the website files that have been moved.
7. Test Your Website
The last step in how to move a website from a subfolder to the main domain is to test the website. This aims to check whether your website can be accessed properly.
The trick, type your domain name in the browser. Next, the default WordPress installation page will appear.

Complete this installation stage and you can try to access the website again.
At this point, you have successfully followed all the steps on how to move website files to the main domain. It’s easy, right?
Do you understand how to move a website from a subfolder?
From this article, you have learned how to move your website from subfolders to the main domain. Step by step is not difficult to run. Even so, make sure nothing is missed, so that your website can be accessed properly again.
Oh yes, the Index Of / error is not the only reason your website cannot be accessed. Other things need attention, such as the quality of the hosting server. Do not let when the traffic is high, the server suddenly goes down.
So, if you need a web hosting service with a resilient server, Hostinger can be your choice. Why is that? With a 99.99% uptime guarantee and the world’s fastest server, LiteSpeed, your website access will run smoothly.
Don’t forget to use a good domain name for your website’s online identity. Hostinger also offers cheap domains with various extensions to suit your needs.
Starting from just $ 0.99, you can pocket a .shop, .online, to .site domain. What are you waiting for? Come on, buy a cheap domain only at Hostinger!
Leave a Reply
View Comments