{"id":50378,"date":"2026-11-20T05:24:08","date_gmt":"2026-11-20T05:24:08","guid":{"rendered":"https:\/\/kickhost.com\/guides\/how-to-edit-dothtaccess-file-in-the-cpanel-file-manager\/"},"modified":"2026-11-28T09:21:10","modified_gmt":"2026-11-28T09:21:10","slug":"how-to-edit-dothtaccess-file-in-the-cpanel-file-manager","status":"publish","type":"kickhost_tutorial","link":"https:\/\/kickhost.com\/en-ke\/guides\/how-to-edit-dothtaccess-file-in-the-cpanel-file-manager\/","title":{"rendered":"How to Edit (Dot)htaccess File in the cPanel File Manager"},"content":{"rendered":"<p>The .htaccess file controls redirects, security rules and caching for your website. You can edit it in File Manager when you need a change.<\/p>\n<p><strong>1.<\/strong> Log in to your cPanel account.<\/p>\n<p> <strong>2.<\/strong> In the <strong>Files<\/strong> section, click on <strong>File Manager<\/strong>.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/filemanager-icon.gif\" alt=\"\" align=\"middle\" loading=\"lazy\"><\/p>\n<p> <strong>3.<\/strong> Navigate to the directory where your dot htaccess file is located. To edit the .htaccess file of your root directory, navigate to the public_html directory. <\/p>\n<p><strong>4. <\/strong>If the .htaccess file is not visible, click <strong>Settings<\/strong> in the top right corner of the File Manager. In the settings window, check the box next to <strong>Show Hidden Files (Dotfiles)<\/strong> and click <strong>Save<\/strong>. The .htaccess file should now be visible. If it is still not there, you can create a new one.<br \/><img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/hidden-htaccess-paperlantern.gif\" alt=\"\" align=\"middle\" loading=\"lazy\"><\/p>\n<p><strong><br \/><\/strong> <strong>5.<\/strong> Right-click on the dot htaccess file and then <strong>Edit<\/strong> in the Context Menu. <br \/> <img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/filemanager-htaccess.gif\" alt=\"\" loading=\"lazy\"> <\/p>\n<p> <strong>6.<\/strong> In a new window box, click on <strong>Edit<\/strong>.<br \/> <img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/filemanager-htaccess-edit-menu.gif\" alt=\"\" loading=\"lazy\"> <\/p>\n<p> <strong>7.<\/strong> Make changes to your dot htaccess file and click on<strong> Save Changes<\/strong>. <br \/> <img decoding=\"async\" src=\"https:\/\/kickhost.com\/img\/filemanager--htaccess-edit.gif\" alt=\"\" loading=\"lazy\"> <\/p>\n<h2>Show hidden files<\/h2>\n<p>The file is hidden by default. In File Manager open Settings and tick Show Hidden Files. Download a copy before you change anything.<\/p>\n<h2>If you get a 500 error<\/h2>\n<p>A typing mistake can break your website. Restore your saved copy and try again with a smaller change.<\/p>\n<h2>Frequently asked questions<\/h2>\n<p><strong>Where is the .htaccess file?<\/strong> Usually in public_html next to your website files.<\/p>\n<p><strong>Can WordPress change .htaccess?<\/strong> Yes. Permalink changes and some plugins add rules.<\/p>\n<h2>Related guides<\/h2>\n<ul>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-restrict-access-to-directories-by-ip-address\/\">Restrict a directory by IP address<\/a><\/li>\n<li><a href=\"https:\/\/kickhost.com\/en-ke\/guides\/how-to-edit-a-file-in-the-cpanel-file-manager\/\">Edit a file in File Manager<\/a><\/li>\n<\/ul>\n<p>Need cPanel hosting in Kenya? <a href=\"https:\/\/kickhost.com\/en-ke\/web-hosting\/\">See KickHost hosting plans<\/a> or <a href=\"https:\/\/kickhost.com\/en-ke\/contact\/\">contact our team<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Edit the .htaccess file in cPanel File Manager. Steps for KickHost customers in Kenya.<\/p>\n","protected":false},"featured_media":0,"template":"","class_list":["post-50378","kickhost_tutorial","type-kickhost_tutorial","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50378","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial"}],"about":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/types\/kickhost_tutorial"}],"version-history":[{"count":3,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50378\/revisions"}],"predecessor-version":[{"id":53430,"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/kickhost_tutorial\/50378\/revisions\/53430"}],"wp:attachment":[{"href":"https:\/\/kickhost.com\/en-ke\/wp-json\/wp\/v2\/media?parent=50378"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}