{"id":12462,"date":"2026-06-04T10:23:57","date_gmt":"2026-06-04T10:23:57","guid":{"rendered":"https:\/\/www.webystrata.com\/blog\/?p=12462"},"modified":"2026-06-04T10:30:11","modified_gmt":"2026-06-04T10:30:11","slug":"change-a-domain-document-root-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.webystrata.com\/blog\/change-a-domain-document-root-in-cpanel\/","title":{"rendered":"How to Change a Domain Document Root in cPanel"},"content":{"rendered":"<h1>How to Change a Domain Document Root in cPanel<\/h1>\n<p>Managing multiple websites from a single hosting account is one of the most useful features of cPanel. Addon domains and subdomains allow you to host additional websites without purchasing separate hosting accounts. However, there may be situations where you need to change the document root of an addon domain or subdomain.<\/p>\n<p>The document root is the directory where the website files for a domain or subdomain are stored. By changing the document root, you can point the domain to a different folder, organize your websites more effectively, or deploy a new website without changing the domain name.<\/p>\n<p>This guide explains what a document root is, why you might need to change it, and how to update it safely in cPanel.<\/p>\n<h2>What Is a Document Root?<\/h2>\n<p>A document root is the folder on your hosting account that contains the files displayed when visitors access your website.<\/p>\n<p>For example:<\/p>\n<ul>\n<li>Main domain: <code>\/public_html<\/code><\/li>\n<li>Addon domain: <code>\/public_html\/example.com<\/code><\/li>\n<li>Subdomain: <code>\/public_html\/blog<\/code><\/li>\n<\/ul>\n<p>When someone visits your website, the web server loads files from the assigned document root directory.<\/p>\n<h2>Before You Begin<\/h2>\n<p>Before changing the document root:<\/p>\n<ol>\n<li>Create a full backup of your website files.<\/li>\n<li>Verify that the new directory contains the correct website files.<\/li>\n<li>Ensure file permissions are properly configured.<\/li>\n<li>Note the current document root in case you need to revert changes.<\/li>\n<\/ol>\n<h2>How to Change a Domain Document Root in cPanel<\/h2>\n<h3 data-section-id=\"1hmzdnt\" data-start=\"203\" data-end=\"246\"><span style=\"color: #000000;\">Step 1: Login to cPanel from Client Area<\/span><\/h3>\n<p data-start=\"446\" data-end=\"570\">First, visit the WebyStrata website and log in to your client area account using your registered email address and password.<\/p>\n<p data-start=\"446\" data-end=\"570\">official Website <a href=\"https:\/\/www.webystrata.com\">www.webystrata.com<\/a><\/p>\n<p data-start=\"291\" data-end=\"308\"><span style=\"color: #000000;\">After logging in:<\/span><\/p>\n<ol data-start=\"310\" data-end=\"429\">\n<li data-section-id=\"ygoy3r\" data-start=\"310\" data-end=\"331\"><span style=\"color: #000000;\">Go to <strong data-start=\"319\" data-end=\"331\">Services<\/strong><\/span><\/li>\n<li data-section-id=\"wyqca4\" data-start=\"332\" data-end=\"359\"><span style=\"color: #000000;\">Click on <strong data-start=\"344\" data-end=\"359\">My Services<\/strong><\/span><\/li>\n<li data-section-id=\"8kxumo\" data-start=\"360\" data-end=\"397\"><span style=\"color: #000000;\">Select your active hosting service<\/span><\/li>\n<li data-section-id=\"4ekbul\" data-start=\"398\" data-end=\"429\"><span style=\"color: #000000;\">Click on <strong data-start=\"410\" data-end=\"429\">Login to cPanel<\/strong><\/span><\/li>\n<\/ol>\n<p><code><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-11961 size-full\" title=\"how-to-change-a-domain-document-root-in-cpanel\" src=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5.webp\" alt=\"how-to-change-a-domain-document-root-in-cpanel\" width=\"1902\" height=\"957\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5.webp 1902w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5-300x151.webp 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5-1024x515.webp 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5-768x386.webp 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/05\/login-into-cpanel-5-1536x773.webp 1536w\" sizes=\"(max-width: 1902px) 100vw, 1902px\" \/><\/code><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 2: Open the Domains Section<\/h3>\n<p>Locate the <strong>Domains<\/strong> section and click <strong>Domains<\/strong>.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-12464\" src=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1.webp\" alt=\"how-to-change-a-domain-document-root-in-cpanel\" width=\"1914\" height=\"899\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1.webp 1914w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1-300x141.webp 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1-1024x481.webp 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1-768x361.webp 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domains-1-1536x721.webp 1536w\" sizes=\"(max-width: 1914px) 100vw, 1914px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 3: Find the Addon Domain<\/h3>\n<p>A list of your domains will appear. Locate the addon domain whose document root you want to change.<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-12465\" src=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list.webp\" alt=\"how-to-change-a-domain-document-root-in-cpanel\" width=\"1893\" height=\"863\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list.webp 1893w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list-300x137.webp 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list-1024x467.webp 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list-768x350.webp 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/domain-list-1536x700.webp 1536w\" sizes=\"(max-width: 1893px) 100vw, 1893px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 4: Modify the Document Root<\/h3>\n<p>Click the <strong>Manage<\/strong> button next to the addon domain.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12466\" src=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2.webp\" alt=\"how-to-change-a-domain-document-root-in-cpanel\" width=\"1893\" height=\"863\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2.webp 1893w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2-300x137.webp 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2-1024x467.webp 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2-768x350.webp 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/manage-2-1536x700.webp 1536w\" sizes=\"(max-width: 1893px) 100vw, 1893px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 5: Save Changes<\/h3>\n<ul>\n<li>Find the <strong>Document Root<\/strong> field and enter the new directory path where the website files are stored.<\/li>\n<\/ul>\n<p>Example:<\/p>\n<pre><code>\/public_html\/newsite<\/code><\/pre>\n<ul>\n<li>Click <strong>Update<\/strong> or <strong>Save<\/strong> to apply the new document root settings.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-12467\" src=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update.webp\" alt=\"how-to-change-a-domain-document-root-in-cpanel\" width=\"1905\" height=\"897\" srcset=\"https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update.webp 1905w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update-300x141.webp 300w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update-1024x482.webp 1024w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update-768x362.webp 768w, https:\/\/www.webystrata.com\/blog\/wp-content\/uploads\/2026\/06\/update-1536x723.webp 1536w\" sizes=\"(max-width: 1905px) 100vw, 1905px\" \/><\/p>\n<p>&nbsp;<\/p>\n<h3>Step 6: Verify the Website<\/h3>\n<p>Visit the domain in your browser and confirm that the website loads correctly from the new directory.<\/p>\n<h2><span style=\"color: #000000;\">Why to Change the Document Root?<\/span><\/h2>\n<p><span style=\"color: #000000;\">There are several reasons why website owners change document roots:<\/span><\/p>\n<ul>\n<li><span style=\"color: #000000;\">Reorganize website files.<\/span><\/li>\n<li><span style=\"color: #000000;\">Move a website to a new directory.<\/span><\/li>\n<li><span style=\"color: #000000;\">Launch a redesigned version of a website.<\/span><\/li>\n<li><span style=\"color: #000000;\">Improve website management.<\/span><\/li>\n<li><span style=\"color: #000000;\">Separate websites into dedicated folders.<\/span><\/li>\n<li><span style=\"color: #000000;\">Configure staging and production environments.<\/span><\/li>\n<\/ul>\n<h2 data-section-id=\"1nfmt9u\" data-start=\"45\" data-end=\"90\">Benefits of Using Separate Document Roots<\/h2>\n<ul data-start=\"92\" data-end=\"792\">\n<li data-section-id=\"a97vgt\" data-start=\"92\" data-end=\"222\"><strong data-start=\"94\" data-end=\"134\">Better Organization of Website Files<\/strong> \u2013 Each domain or subdomain has its own dedicated folder, making files easier to manage.<\/li>\n<li data-section-id=\"db1bxc\" data-start=\"224\" data-end=\"363\"><strong data-start=\"226\" data-end=\"247\">Enhanced Security<\/strong> \u2013 Isolating websites reduces the risk of one compromised site affecting other websites on the same hosting account.<\/li>\n<li data-section-id=\"lm3ge0\" data-start=\"365\" data-end=\"499\"><strong data-start=\"367\" data-end=\"404\">Simplified Backups and Migrations<\/strong> \u2013 Individual websites can be backed up, restored, or migrated without impacting other domains.<\/li>\n<li data-section-id=\"j1ey09\" data-start=\"501\" data-end=\"636\"><strong data-start=\"503\" data-end=\"533\">Easier Website Maintenance<\/strong> \u2013 Updates, troubleshooting, and configuration changes can be performed independently for each website.<\/li>\n<li data-section-id=\"1q07u0z\" data-start=\"638\" data-end=\"792\"><strong data-start=\"640\" data-end=\"688\">Reduced Risk of Accidental File Modification<\/strong> \u2013 Separate directories help prevent files from being overwritten, deleted, or modified unintentionally.<\/li>\n<li data-section-id=\"1q07u0z\" data-start=\"638\" data-end=\"792\"><strong data-start=\"1762\" data-end=\"1788\">Faster Troubleshooting<\/strong> \u2013 Isolating website files helps diagnose issues such as broken links, configuration errors, or application conflicts more efficiently.<\/li>\n<\/ul>\n<h2>Conclusion<\/h2>\n<p>Changing the document root of an addon domain or subdomain in cPanel is a straight-forward process that helps you better organize and manage your websites. By updating the document root, you can point a domain or subdomain to a new folder without changing its URL. Always create a backup before making modifications and test the website thoroughly after applying the changes to ensure everything works correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Change a Domain Document Root in cPanel Managing multiple websites from a single hosting account is one of the most useful features of cPanel. Addon domains and subdomains allow you to host additional websites without purchasing separate hosting accounts. However, there may be situations where you need to change the document root of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":12468,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,2],"tags":[],"class_list":["post-12462","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-latest-updates","category-cpanel"],"_links":{"self":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/12462","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/comments?post=12462"}],"version-history":[{"count":7,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/12462\/revisions"}],"predecessor-version":[{"id":12476,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/posts\/12462\/revisions\/12476"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media\/12468"}],"wp:attachment":[{"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/media?parent=12462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/categories?post=12462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webystrata.com\/blog\/wp-json\/wp\/v2\/tags?post=12462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}