{"id":12145,"date":"2021-10-26T14:47:56","date_gmt":"2021-10-26T14:47:56","guid":{"rendered":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?p=12145"},"modified":"2025-05-30T13:11:11","modified_gmt":"2025-05-30T12:11:11","slug":"how-to-create-edit-htaccess-file-via-directadmin","status":"publish","type":"post","link":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/","title":{"rendered":"How to Create\/Edit .htaccess File via DirectAdmin?"},"content":{"rendered":"<p>It is surprisingly easy to create or edit a .htaccess file using DirectAdmin. The file contains configuration directives for other on-server files and directories.<\/p>\n<h2>To Create\/Edit .htaccess File<\/h2>\n<p>1. Log in to your DirectAdmin account.<\/p>\n<p>2. Go to the <strong>System Info &amp; Files<\/strong> section and click on <strong>File Manager<\/strong>.<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-11514\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/04\/file_manager_diradm.png\" alt=\"\" width=\"1450\" height=\"236\" \/><\/p>\n<p>The <em>File Manager<\/em> interface will open in a new tab.<\/p>\n<p>Originally, a .htaccess is a hidden file by default and therefore unviewable to users. It is why we recommend you check if the file exists before creating one.<\/p>\n<p>3. Enter the following text in the address bar to check if the .htaccess file is present or not.<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true \">domain.com:2222\/CMD_FILE_MANAGER\/domains\/domain.com\/public_html\/.htaccess?action=edit<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13628\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_file_manager_htaccess_check_censored.jpg\" alt=\"\" width=\"1598\" height=\"367\" \/><\/p>\n<p>If it shows an error message, the file is absent. It means you can create the .htaccess file.<\/p>\n<p>4. Navigate to the <em>public_html<\/em> folder and click the <strong>+\u00a0<\/strong><strong>NEW<\/strong>\u00a0menu.<\/p>\n<p>5. A dropdown menu will appear where you have to select the <strong>Text File<\/strong> option and then <strong>Plain Text<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13630\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_file_manager_public_html_text_file_plain.jpg\" alt=\"\" width=\"1599\" height=\"690\" \/><\/p>\n<p>A popup window will appear where you can name and create a file.<\/p>\n<p>6. Enter <em>.htaccess<\/em> in the text field and click <strong>CREATE<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13631\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_file_manager_htaccess_create.png\" alt=\"\" width=\"454\" height=\"262\" \/><\/p>\n<p>The new .htaccess file will appear in the list of directories.<\/p>\n<p>7. Right-click on the <em>.htaccess<\/em> file and select <strong>Edit<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13632\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_file_manager_htaccess_edit.png\" alt=\"\" width=\"472\" height=\"435\" \/><\/p>\n<p>8. Enter the directives and click <strong>SAVE<\/strong>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13633\" src=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/10\/da_file_manager_htaccess_save.png\" alt=\"\" width=\"1578\" height=\"658\" \/><\/p>\n<p>Yes, it is that simple to create and edit a .htaccess file via DirectAdmin.<\/p>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is surprisingly easy to create or edit a .htaccess file using DirectAdmin. The file contains configuration directives for other on-server files and directories. To Create\/Edit .htaccess File 1. Log in to your DirectAdmin account. 2. Go to the System Info &amp; Files section and click on File Manager. The File Manager interface will open [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1777,41],"tags":[649,608,609,2609,1400],"class_list":["post-12145","post","type-post","status-publish","format-standard","placeholder-for-hentry","category-directadmin","category-howtos","tag-htaccess","tag-htaccess-file","tag-create-htaccess-file","tag-create-edit-htaccess-directadmin","tag-edit-htaccess-file"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Create\/Edit .htaccess File via DirectAdmin?<\/title>\n<meta name=\"description\" content=\"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Create\/Edit .htaccess File via DirectAdmin?\" \/>\n<meta property=\"og:description\" content=\"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-26T14:47:56+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-05-30T12:11:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1584\" \/>\n\t<meta property=\"og:image:height\" content=\"405\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Prasad Khartadkar\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prasad Khartadkar\" \/>\n\t<meta name=\"twitter:label2\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/\",\"name\":\"How to Create\/Edit .htaccess File via DirectAdmin?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/04\/file_manager_diradm.png\",\"datePublished\":\"2021-10-26T14:47:56+00:00\",\"dateModified\":\"2025-05-30T12:11:11+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\"},\"description\":\"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png\",\"contentUrl\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png\",\"width\":1584,\"height\":405},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Create\/Edit .htaccess File via DirectAdmin?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\",\"name\":\"Prasad Khartadkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g\",\"caption\":\"Prasad Khartadkar\"},\"description\":\"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.\",\"url\":\"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Create\/Edit .htaccess File via DirectAdmin?","description":"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/","og_locale":"en_GB","og_type":"article","og_title":"How to Create\/Edit .htaccess File via DirectAdmin?","og_description":"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.","og_url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2021-10-26T14:47:56+00:00","article_modified_time":"2025-05-30T12:11:11+00:00","og_image":[{"width":1584,"height":405,"url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png","type":"image\/png"}],"author":"Prasad Khartadkar","twitter_misc":{"Written by":"Prasad Khartadkar","Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/","name":"How to Create\/Edit .htaccess File via DirectAdmin?","isPartOf":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/04\/file_manager_diradm.png","datePublished":"2021-10-26T14:47:56+00:00","dateModified":"2025-05-30T12:11:11+00:00","author":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e"},"description":"This article will guide you and explain the process to create and edit a .htaccess file with the help of the File Manager tool in DirectAdmin.","breadcrumb":{"@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#primaryimage","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png","contentUrl":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_backup_step1-min.png","width":1584,"height":405},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/how-to-create-edit-htaccess-file-via-directadmin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Create\/Edit .htaccess File via DirectAdmin?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Person","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e","name":"Prasad Khartadkar","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/fafb102a39aa8f8d38a11f3e2dcfa746?s=96&d=blank&r=g","caption":"Prasad Khartadkar"},"description":"Prasad is a business grad specialized in Marketing. He has garnered experience as a technical content writer and a digital marketer that he brings out in his work. He likes reading classics and travel in his free time.","url":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/author\/prasad-khartadkar\/"}]}},"views":441,"_links":{"self":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12145","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=12145"}],"version-history":[{"count":5,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12145\/revisions"}],"predecessor-version":[{"id":16797,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/posts\/12145\/revisions\/16797"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=12145"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=12145"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.co.uk\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=12145"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}