Your Document Root is the specific folder on your web hosting server where your website's primary files (such as
index.html or index.php) are stored and served to visitors.Changing your Document Root allows you to switch your live domain to point to a new directory—for example, if you have built a temporary static page (e.g.,
yourdomain.ca-static), created a redesign staging folder, or uploaded a new application directory.Key Things to Keep in Mind Before You Begin
- No Files Are Deleted: Updating your Document Root only changes where the web server looks to display your site. It does not delete, move, or overwrite any files in your current or new folders.
- Make Sure an Index File Exists: Before pointing your domain to a new folder, ensure that folder contains an index file (
index.html,index.php, orindex.htm). If the new directory is empty or missing an index file, visitors will see a403 Forbiddenor404 Not Founderror.
- Easy Rollback: If your new site layout encounters an issue after switching, you can instantly revert back to your original folder in seconds.
Step-by-Step Guide: How to Change Your Document Root in Plesk
- Log into your Plesk Hosting Control Panel.
- Navigate to Websites & Domains in the left-hand navigation menu.
- Locate your domain name, click on the Hosting & DNS tab, and select Hosting Settings.
- Scroll down to the Web space section and find the Document root field.
- Enter the exact name of the folder you want your site to load from (e.g., change
yourdomain.catoyourdomain.ca-static).
- Click OK or Apply at the bottom of the page to save your changes.
Step 3: Verifying Your Changes
After clicking OK, test your site to make sure the new directory is serving properly:
- Open a new browser window in Incognito / Private Browsing Mode (this prevents your browser from loading an older cached version of your site).
- Visit your domain name (e.g.,
[https://yourdomain.ca]).
- Verify that your new page content loads as expected.
Need to switch back? If you see an error, simply go back to Hosting Settings, re-enter your original folder name into the Document root field, and click OK to restore your site immediately.
Comments
0 comments
Please sign in to leave a comment.