{"id":192,"date":"2016-09-19T10:45:46","date_gmt":"2016-09-19T10:45:46","guid":{"rendered":"https:\/\/example.com\/wordpress\/?p=192"},"modified":"2016-09-19T10:45:46","modified_gmt":"2016-09-19T10:45:46","slug":"how-to-restrict-directory-access-by-ip-address","status":"publish","type":"post","link":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/","title":{"rendered":"How to restrict directory access by IP address?"},"content":{"rendered":"<p><span style=\"font-size: medium;\">To secure your admin area from hackers, we recommend that you allow access only from a selected IP address to your admin directory. You need to create a .htaccess file in the directory where you want to restrict access to specific IP addresses.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"font-size: medium;\">For example, if you have a WordPress blog installed on your main directory and log in via example.com\/wp-admin, you should create an .htaccess file in <strong>\/wp-admin\/.htaccess<\/strong>, and you should put the following code into it. Don&#8217;t forget to replace the allowed IP address with your IP address.<\/span><\/p>\n<pre class=\"language-markup\"><code>order deny, allow\ndeny from all\nallow from YOUR-IP-ADDRESS-HERE<\/code><\/pre>\n<p><span style=\"font-size: medium;\">(Replace \u00ab<strong>Your-IP-Address-Here<\/strong>\u00bb text with your IP Address)<\/span><\/p>\n<p><span style=\"font-size: medium;\">You can test this by accessing your \/wp-admin IP address from another IP address, which is not mentioned in your .htaccess file.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>To secure your admin area from hackers, we recommend that you allow access only from a selected IP address to your admin directory. You need to create a .htaccess file in the directory where you want to restrict access to specific IP addresses. &nbsp; For example, if you have a WordPress blog installed on your [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39],"tags":[],"class_list":["post-192","post","type-post","status-publish","format-standard","hentry","category-security-cpanel"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to restrict directory access by IP address? - Reselhost<\/title>\n<meta name=\"description\" content=\"How to restrict directory access by IP address? Reseller Hosting $2,99\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata\" \/>\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.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/\" \/>\n<meta property=\"og:locale\" content=\"es_ES\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to restrict directory access by IP address? - Reselhost\" \/>\n<meta property=\"og:description\" content=\"How to restrict directory access by IP address? Reseller Hosting $2,99\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/\" \/>\n<meta property=\"og:site_name\" content=\"Reselhost\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/reselhost\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-19T10:45:46+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.reselhost.com\/kb\/wp-content\/uploads\/2021\/08\/face-anuncio.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"648\" \/>\n\t<meta property=\"og:image:height\" content=\"441\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"soporte\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@reselhost\" \/>\n<meta name=\"twitter:site\" content=\"@reselhost\" \/>\n<meta name=\"twitter:label1\" content=\"Escrito por\" \/>\n\t<meta name=\"twitter:data1\" content=\"soporte\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tiempo de lectura\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minuto\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/\"},\"author\":{\"name\":\"soporte\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c492d9c4d151007f1f78cc0e9d64be69\"},\"headline\":\"How to restrict directory access by IP address?\",\"datePublished\":\"2016-09-19T10:45:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/\"},\"wordCount\":132,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#organization\"},\"articleSection\":[\"Security (cPanel)\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/\",\"url\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/\",\"name\":\"How to restrict directory access by IP address? - Reselhost\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#website\"},\"datePublished\":\"2016-09-19T10:45:46+00:00\",\"description\":\"How to restrict directory access by IP address? Reseller Hosting $2,99\\\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/how-to-restrict-directory-access-by-ip-address\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Portada\",\"item\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to restrict directory access by IP address?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/\",\"name\":\"Reselhost\",\"description\":\"Base de Conocimientos Hosting Reseller Hosting\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#organization\",\"name\":\"Reselhost\",\"url\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/logo-grande.png\",\"contentUrl\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/logo-grande.png\",\"width\":200,\"height\":200,\"caption\":\"Reselhost\"},\"image\":{\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/reselhost\",\"https:\\\/\\\/x.com\\\/reselhost\",\"https:\\\/\\\/www.instagram.com\\\/reselhost\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/reselhost\",\"https:\\\/\\\/www.youtube.com\\\/@reselhost\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.reselhost.com\\\/kb\\\/#\\\/schema\\\/person\\\/c492d9c4d151007f1f78cc0e9d64be69\",\"name\":\"soporte\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g\",\"caption\":\"soporte\"},\"sameAs\":[\"https:\\\/\\\/www.intelhost.com\\\/kb\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to restrict directory access by IP address? - Reselhost","description":"How to restrict directory access by IP address? Reseller Hosting $2,99\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata","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.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/","og_locale":"es_ES","og_type":"article","og_title":"How to restrict directory access by IP address? - Reselhost","og_description":"How to restrict directory access by IP address? Reseller Hosting $2,99\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata","og_url":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/","og_site_name":"Reselhost","article_publisher":"https:\/\/www.facebook.com\/reselhost","article_published_time":"2016-09-19T10:45:46+00:00","og_image":[{"width":648,"height":441,"url":"https:\/\/www.reselhost.com\/kb\/wp-content\/uploads\/2021\/08\/face-anuncio.jpg","type":"image\/jpeg"}],"author":"soporte","twitter_card":"summary_large_image","twitter_creator":"@reselhost","twitter_site":"@reselhost","twitter_misc":{"Escrito por":"soporte","Tiempo de lectura":"1 minuto"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/#article","isPartOf":{"@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/"},"author":{"name":"soporte","@id":"https:\/\/www.reselhost.com\/kb\/#\/schema\/person\/c492d9c4d151007f1f78cc0e9d64be69"},"headline":"How to restrict directory access by IP address?","datePublished":"2016-09-19T10:45:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/"},"wordCount":132,"commentCount":0,"publisher":{"@id":"https:\/\/www.reselhost.com\/kb\/#organization"},"articleSection":["Security (cPanel)"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/","url":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/","name":"How to restrict directory access by IP address? - Reselhost","isPartOf":{"@id":"https:\/\/www.reselhost.com\/kb\/#website"},"datePublished":"2016-09-19T10:45:46+00:00","description":"How to restrict directory access by IP address? Reseller Hosting $2,99\/mes Migraci\u00f3n Gratis SSL Gratis Cuentas cPanel Ilimitadas Activaci\u00f3n Inmediata","breadcrumb":{"@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.reselhost.com\/kb\/how-to-restrict-directory-access-by-ip-address\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Portada","item":"https:\/\/www.reselhost.com\/kb\/"},{"@type":"ListItem","position":2,"name":"How to restrict directory access by IP address?"}]},{"@type":"WebSite","@id":"https:\/\/www.reselhost.com\/kb\/#website","url":"https:\/\/www.reselhost.com\/kb\/","name":"Reselhost","description":"Base de Conocimientos Hosting Reseller Hosting","publisher":{"@id":"https:\/\/www.reselhost.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.reselhost.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.reselhost.com\/kb\/#organization","name":"Reselhost","url":"https:\/\/www.reselhost.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.reselhost.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/www.reselhost.com\/kb\/wp-content\/uploads\/2023\/05\/logo-grande.png","contentUrl":"https:\/\/www.reselhost.com\/kb\/wp-content\/uploads\/2023\/05\/logo-grande.png","width":200,"height":200,"caption":"Reselhost"},"image":{"@id":"https:\/\/www.reselhost.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/reselhost","https:\/\/x.com\/reselhost","https:\/\/www.instagram.com\/reselhost","https:\/\/www.linkedin.com\/in\/reselhost","https:\/\/www.youtube.com\/@reselhost"]},{"@type":"Person","@id":"https:\/\/www.reselhost.com\/kb\/#\/schema\/person\/c492d9c4d151007f1f78cc0e9d64be69","name":"soporte","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e889bfe45e57e333934f731d2f44d88bc7a50c1d0b8c9b5c48e9a69b5a775459?s=96&d=mm&r=g","caption":"soporte"},"sameAs":["https:\/\/www.intelhost.com\/kb"]}]}},"_links":{"self":[{"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/posts\/192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/comments?post=192"}],"version-history":[{"count":0,"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/posts\/192\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/media?parent=192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/categories?post=192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.reselhost.com\/kb\/wp-json\/wp\/v2\/tags?post=192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}