{"id":14650,"date":"2021-11-05T06:50:32","date_gmt":"2021-11-05T06:50:32","guid":{"rendered":"https:\/\/www.milesweb.in\/hosting-faqs\/?p=14650"},"modified":"2021-12-13T07:29:02","modified_gmt":"2021-12-13T07:29:02","slug":"deny-access-htaccess-file-directadmin","status":"publish","type":"post","link":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/","title":{"rendered":"How to Deny Access to .htaccess File using DirectAdmin?"},"content":{"rendered":"<p><strong>Watch this video for a step by step process on How to Deny Access to .htaccess File using DirectAdmin<\/strong><\/p>\n<div class=\"youtube-video\" style=\"border: 1px solid #ddd;\"><iframe src=\"https:\/\/www.youtube.com\/embed\/9ZOU8W5rq10\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/div>\n<p>Protecting the vital hidden files of the hosting is a must for server security. When you deny access to the .htaccess file using a control panel like DirectAdmin, the file will be safe from external interference.<\/p>\n<h2>To Deny Access to .htaccess File<\/h2>\n<p>1. Log in to DirectAdmin.<\/p>\n<p>2. Open <strong>File Manager<\/strong> and edit the <strong>.htaccess<\/strong> file.<\/p>\n<p>Here&#8217;s an article that explains: <a href=\"https:\/\/www.milesweb.in\/hosting-faqs\/create-edit-htaccess-file-directadmin\/\">How to Create\/Edit .htaccess File via DirectAdmin?<\/a><\/p>\n<p>3. Add this code at the end of the file:<\/p>\n<pre class=\"font-size:15 line-height:20 lang:default decode:true\"># Deny access to hidden files - files that start with a dot (.)\r\n&lt;FilesMatch \"^\\.\"&gt;\r\nOrder allow,deny\r\nDeny from all<\/pre>\n<p>4. Click <strong>SAVE<\/strong> and <strong>CLOSE<\/strong> the file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-13846\" src=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png\" alt=\"\" width=\"1556\" height=\"656\" \/><\/p>\n<p>If you own a VPS or a dedicated server, you can protect the .htaccess\/hidden files on all the sites on it.\u00a0You have to edit the <em>\/home\/.htaccess<\/em> file and enter the code there.<\/p>\n<div class=\"kb-wisdom-wrapr kb-wisdom-info\">\n<div class=\"kb-wisdom-col kb-wisdom-col-icon\">\n<div class=\"kb-wisdom-icon\">\n<div><\/div>\n<\/div>\n<\/div>\n<div class=\"kb-wisdom-col kb-wisdom-col-content\">\n<p><strong>Note<\/strong>: If you are an admin, it is still possible to edit the .htaccess file via FTP\/DirectAdmin File Manager, even after you have entered the code to deny access.<\/p>\n<\/div>\n<\/div>\n<p><script type=\"application\/ld+json\">{\n  \"@context\": \"http:\/\/schema.org\",\n  \"@type\": \"VideoObject\",\n  \"name\": \"How to Deny Access to .htaccess File using DirectAdmin? | MilesWeb\",\n  \"description\": \"\u2705Here's an in-depth guide on how to Deny Access to .htaccess File using DirectAdmin:  https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/ Give a thumbs up \ud83d\udc4d if you liked this video.  Subscribe to our channel and get notified for all the latest videos. Contents of this video: 0:00 - Intro 0:54 - Code to deny access to .htaccess file (https:\/\/codepen.io\/MilesWeb\/pen\/ZEXpPVy) \ud83d\udd17To know more about web hosting visit our website - https:\/\/www.milesweb.in\",\n  \"thumbnailUrl\": \"https:\/\/i.ytimg.com\/vi\/9ZOU8W5rq10\/default.jpg\",\n  \"uploadDate\": \"2021-12-11T13:37:57Z\",\n  \"duration\": \"PT1M35S\",\n  \"embedUrl\": \"https:\/\/www.youtube.com\/embed\/9ZOU8W5rq10\",\n  \"interactionCount\": \"5\"\n}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Watch this video for a step by step process on How to Deny Access to .htaccess File using DirectAdmin Protecting the vital hidden files of the hosting is a must for server security. When you deny access to the .htaccess file using a control panel like DirectAdmin, the file will be safe from external interference. [&hellip;]<\/p>\n","protected":false},"author":27,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1798,41],"tags":[672,627,628,2679,2680,1421,2678],"class_list":["post-14650","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","tag-deny-access-htaccess-directadmin","tag-edit-htaccess-file","tag-protect-htaccess-file"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Deny Access to .htaccess File using DirectAdmin?<\/title>\n<meta name=\"description\" content=\"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using 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.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Deny Access to .htaccess File using DirectAdmin?\" \/>\n<meta property=\"og:description\" content=\"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using DirectAdmin.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Hosting FAQs by MilesWeb\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-05T06:50:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-12-13T07:29:02+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.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=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\"},\"author\":{\"name\":\"Prasad Khartadkar\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\"},\"headline\":\"How to Deny Access to .htaccess File using DirectAdmin?\",\"datePublished\":\"2021-11-05T06:50:32+00:00\",\"dateModified\":\"2021-12-13T07:29:02+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\"},\"wordCount\":176,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png\",\"keywords\":[\".htaccess\",\".htaccess file\",\"create .htaccess file\",\"create edit htaccess\",\"Deny Access htaccess DirectAdmin\",\"edit .htaccess file\",\"protect htaccess file\"],\"articleSection\":[\"DirectAdmin\",\"How-Tos\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\",\"name\":\"How to Deny Access to .htaccess File using DirectAdmin?\",\"isPartOf\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png\",\"datePublished\":\"2021-11-05T06:50:32+00:00\",\"dateModified\":\"2021-12-13T07:29:02+00:00\",\"author\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\"},\"description\":\"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using DirectAdmin.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_restore_backup.jpg\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_restore_backup.jpg\",\"width\":1587,\"height\":333},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to Deny Access to .htaccess File using DirectAdmin?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#website\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/\",\"name\":\"Web Hosting FAQs by MilesWeb\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e\",\"name\":\"Prasad Khartadkar\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/08\/Prasad-K.-1-150x150.jpg\",\"contentUrl\":\"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/08\/Prasad-K.-1-150x150.jpg\",\"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.\",\"sameAs\":[\"https:\/\/www.milesweb.in\"],\"url\":\"https:\/\/www.milesweb.in\/hosting-faqs\/author\/prasad-khartadkar\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Deny Access to .htaccess File using DirectAdmin?","description":"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using 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.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/","og_locale":"en_US","og_type":"article","og_title":"How to Deny Access to .htaccess File using DirectAdmin?","og_description":"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using DirectAdmin.","og_url":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/","og_site_name":"Web Hosting FAQs by MilesWeb","article_published_time":"2021-11-05T06:50:32+00:00","article_modified_time":"2021-12-13T07:29:02+00:00","og_image":[{"url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png","type":"","width":"","height":""}],"author":"Prasad Khartadkar","twitter_misc":{"Written by":"Prasad Khartadkar","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#article","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/"},"author":{"name":"Prasad Khartadkar","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e"},"headline":"How to Deny Access to .htaccess File using DirectAdmin?","datePublished":"2021-11-05T06:50:32+00:00","dateModified":"2021-12-13T07:29:02+00:00","mainEntityOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/"},"wordCount":176,"commentCount":0,"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png","keywords":[".htaccess",".htaccess file","create .htaccess file","create edit htaccess","Deny Access htaccess DirectAdmin","edit .htaccess file","protect htaccess file"],"articleSection":["DirectAdmin","How-Tos"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/","name":"How to Deny Access to .htaccess File using DirectAdmin?","isPartOf":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage"},"image":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage"},"thumbnailUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/11\/da_htaccess_deny_access.png","datePublished":"2021-11-05T06:50:32+00:00","dateModified":"2021-12-13T07:29:02+00:00","author":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e"},"description":"This guide will help you understand how to deny access to .htaccess and other hidden files like it and protect them using DirectAdmin.","breadcrumb":{"@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#primaryimage","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_restore_backup.jpg","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/09\/da_restore_backup.jpg","width":1587,"height":333},{"@type":"BreadcrumbList","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/deny-access-htaccess-file-directadmin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.milesweb.in\/hosting-faqs\/"},{"@type":"ListItem","position":2,"name":"How to Deny Access to .htaccess File using DirectAdmin?"}]},{"@type":"WebSite","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#website","url":"https:\/\/www.milesweb.in\/hosting-faqs\/","name":"Web Hosting FAQs by MilesWeb","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.milesweb.in\/hosting-faqs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/c9138a9488172a8d0aa2d4f40878d83e","name":"Prasad Khartadkar","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.milesweb.in\/hosting-faqs\/#\/schema\/person\/image\/","url":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/08\/Prasad-K.-1-150x150.jpg","contentUrl":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-content\/uploads\/2021\/08\/Prasad-K.-1-150x150.jpg","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.","sameAs":["https:\/\/www.milesweb.in"],"url":"https:\/\/www.milesweb.in\/hosting-faqs\/author\/prasad-khartadkar\/"}]}},"_links":{"self":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/14650","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/users\/27"}],"replies":[{"embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/comments?post=14650"}],"version-history":[{"count":2,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/14650\/revisions"}],"predecessor-version":[{"id":15117,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/posts\/14650\/revisions\/15117"}],"wp:attachment":[{"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/media?parent=14650"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/categories?post=14650"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.milesweb.in\/hosting-faqs\/wp-json\/wp\/v2\/tags?post=14650"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}