1. Home
  2. Domains & DNS
  3. How do I change the document root for a domain name?

How do I change the document root for a domain name?

To change the document root for a domain name you need to follow the steps below.

  1. Begin by logging on to cPanel.
  2. Then click the icon Domains under Domains.
  3. Find the domain name you want to change the document root of and click the Manage button to the right.
  4. On the page you now land on, you will have the option to change the document root for the domain. Click the Update button when you are done with the changes.

If you don’t see the field to update the document root, the domain is added as an alias to your web hosting account. An alias always points to the same folder as the account’s primary domain, which is public_html. If you want to be able to change which folder the domain points to, you need to remove it from the account and add it again, being sure to untick the box about sharing the document root with the web hosting account’s main domain.
Translated with www.DeepL.com/Translator (free version)

Please note that the files will not move automatically, you will have to move them yourself.

Was this article helpful?

Related Articles