{"id":5240,"date":"2018-07-25T08:38:02","date_gmt":"2018-07-25T07:38:02","guid":{"rendered":"https:\/\/www.oderland.se\/support\/?post_type=ht_kb&#038;p=5240"},"modified":"2026-02-19T10:49:28","modified_gmt":"2026-02-19T09:49:28","slug":"how-do-i-change-the-document-root-for-a-domain-name","status":"publish","type":"ht_kb","link":"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-change-the-document-root-for-a-domain-name\/","title":{"rendered":"How do I change the document root for a domain name?"},"content":{"rendered":"\n<p>To change the document root for a domain name you need to follow the steps below.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-danger\">Please note that it is not possible to change the document root for the main domain; it is locked to the public_html folder.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Begin by <a rel=\"noopener noreferrer\" href=\"https:\/\/www.oderland.se\/support\/en\/artikel\/how-do-i-login-to-cpanel\/\" target=\"_blank\">logging on to cPanel.<\/a><\/li>\n\n\n\n<li>Then click the icon <code>Domains<\/code> under <code>Domains<\/code>.<a href=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png\"><img loading=\"lazy\" decoding=\"async\" width=\"690\" height=\"215\" class=\"wp-image-18530\" style=\"width: 690px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains.png 690w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-300x93.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-50x16.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-60x19.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2023\/05\/cpanel_icon_domains-100x31.png 100w\" sizes=\"auto, (max-width: 690px) 100vw, 690px\" \/><\/a><\/li>\n\n\n\n<li>Find the domain name you want to change the document root of and click the <code>Manage<\/code> button to the right.<br><img loading=\"lazy\" decoding=\"async\" width=\"1263\" height=\"90\" class=\"wp-image-19122\" style=\"width: 1263px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button.png 1263w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-300x21.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-1024x73.png 1024w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-768x55.png 768w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-50x4.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-60x4.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_manage_button-100x7.png 100w\" sizes=\"auto, (max-width: 1263px) 100vw, 1263px\" \/><\/li>\n\n\n\n<li>On the page you now land on, you will have the option to change the document root for the domain. Click the <code>Update<\/code> button when you are done with the changes.<br><img loading=\"lazy\" decoding=\"async\" width=\"879\" height=\"322\" class=\"wp-image-19124\" style=\"width: 879px;\" src=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root.png\" alt=\"\" srcset=\"https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root.png 879w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root-300x110.png 300w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root-768x281.png 768w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root-50x18.png 50w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root-60x22.png 60w, https:\/\/www.oderland.se\/support\/wp-content\/uploads\/2018\/07\/cpanel_domains_update_document_root-100x37.png 100w\" sizes=\"auto, (max-width: 879px) 100vw, 879px\" \/><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-alert\">If you don&#8217;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&#8217;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&#8217;s main domain.<br>Translated with www.DeepL.com\/Translator (free version)<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\">Please note that the files will not move automatically, you will have to move them yourself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>To change the document root for a domain name you need to follow the steps below.<\/p>\n","protected":false},"author":1,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"ht-kb-category":[198],"ht-kb-tag":[],"class_list":["post-5240","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-domains-and-dns"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/5240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/comments?post=5240"}],"version-history":[{"count":12,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/5240\/revisions"}],"predecessor-version":[{"id":24966,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb\/5240\/revisions\/24966"}],"wp:attachment":[{"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/media?parent=5240"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-category?post=5240"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/www.oderland.se\/support\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=5240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}