{"id":2673,"date":"2021-01-11T14:18:33","date_gmt":"2021-01-11T19:18:33","guid":{"rendered":"https:\/\/kb.n0c.com\/?post_type=ht_kb&#038;p=2673"},"modified":"2026-07-22T12:50:43","modified_gmt":"2026-07-22T16:50:43","slug":"manual-activation-of-hot-link-protection","status":"publish","type":"ht_kb","link":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/","title":{"rendered":"How to Activate Hot-Link Protection Manually"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Have you ever noticed that some Web users use the files and images you publish with hyperlinks to your server to display them directly on their websites without your permission? This practice is known as \u00ab&nbsp;hot-linking&nbsp;\u00bb or \u00ab&nbsp;bandwith stealing&nbsp;\u00bb. It is highly desirable to protect yourself against this, as it can ultimately cause slowdowns on your sites.<\/p>\n\n\n\n<p>This article shows you how to protect your site from hot-links via an <strong>.htaccess<\/strong> (hypertext access) file. The <strong>.htaccess<\/strong> files allow you to add simple or complex rules to the web server of your web hosting (Apache or LiteSpeed). You just need to add a few lines of code to an <strong>.htaccess<\/strong> file to be protected from hot-links. Note that a tool will be available in the future to perform this task automatically.<\/p>\n\n\n\n<p class=\"wp-block-ht-blocks-messages wp-block-hb-message wp-block-hb-message--withicon is-style-info\"><strong>Note :<\/strong> <meta charset=\"utf-8\">The&nbsp;<a href=\"https:\/\/kb.n0c.com\/en\/glossary\/\" data-type=\"URL\" data-id=\"https:\/\/kb.n0c.com\/en\/glossary\/\">Glossary<\/a>&nbsp;contains explanations on multiple topics and can be consulted to clarify certain terms.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisite<\/h2>\n\n\n\n<p>Access to <a href=\"https:\/\/mg.n0c.com\/en\/\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/mg.n0c.com\/en\/<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Procedure<\/h2>\n\n\n\n<p>The procedure is explained for the N0C interface, as explained in the article <a href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/n0c-filemanager\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Use the File Manager<\/a>, but you can use FTP as well.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Click <strong>Files<\/strong> -&gt; <strong>File Manager<\/strong>.<\/li>\n\n\n\n<li>Navigate to the root directory of the website you want to protect. If this is your main domain, the directory is called <strong>public_html<\/strong>.<\/li>\n\n\n\n<li>Edit the <strong>.htaccess<\/strong> file.<\/li>\n\n\n\n<li>Add this code:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-preformatted\">RewriteEngine on\nRewriteCond %{HTTP_REFERER} !^$\nRewriteCond %{HTTP_REFERER} !^http(s)?:<strong>\/\/(www\\.)?yourdomain.com [NC]<\/strong>\nRewriteCond %{HTTP_REFERER} !^http(s)?:<strong>\/\/(www\\.)?yourdomain2.com [NC]<\/strong>\nRewriteRule .*\\.(jpg|jpeg|gif|png|bmp)$ - <strong>[F,NC]<\/strong><\/pre>\n\n\n\n<p>In lines 3 and 4, change <strong>yourdomain.com<\/strong> and <strong>yourdomain2.com<\/strong> for your domains names (indeed, by default, all sites are blocked for automatic linking). For line 5, the images you want to block for hot- linking are in brackets (); to add more, simply separate them with the &#8220;|&#8221; symbol.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>Save the code by clicking on the <strong>Save<\/strong> button.<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Have you ever noticed that some Web users use the files and images you publish with hyperlinks to your server to display them directly on their websites without your permission? This practice is known as \u00ab hot-linking \u00bb or \u00ab bandwith stealing \u00bb. It is highly desirable to protect yourself against this, as it can ultimately cause slowdowns on your sites.<\/p>\n","protected":false},"author":1,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"footnotes":""},"ht-kb-category":[165],"ht-kb-tag":[273,272,176],"class_list":["post-2673","ht_kb","type-ht_kb","status-publish","format-standard","hentry","ht_kb_category-files","ht_kb_tag-bandwith-stealing","ht_kb_tag-hot-link-2","ht_kb_tag-n0c-2"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Activate Hot-Link Protection Manually - N0C KB<\/title>\n<meta name=\"description\" content=\"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Activate Hot-Link Protection Manually - N0C KB\" \/>\n<meta property=\"og:description\" content=\"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/\" \/>\n<meta property=\"og:site_name\" content=\"N0C KB\" \/>\n<meta property=\"article:modified_time\" content=\"2026-07-22T16:50:43+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/manual-activation-of-hot-link-protection\\\/\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/manual-activation-of-hot-link-protection\\\/\",\"name\":\"How to Activate Hot-Link Protection Manually - N0C KB\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\"},\"datePublished\":\"2021-01-11T19:18:33+00:00\",\"dateModified\":\"2026-07-22T16:50:43+00:00\",\"description\":\"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/manual-activation-of-hot-link-protection\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/manual-activation-of-hot-link-protection\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/manual-activation-of-hot-link-protection\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Articles\",\"item\":\"https:\\\/\\\/kb.n0c.com\\\/en\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Activate Hot-Link Protection Manually\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/kb.n0c.com\\\/#website\",\"url\":\"https:\\\/\\\/kb.n0c.com\\\/\",\"name\":\"N0C KB\",\"description\":\"Official documentation of the N0C hosting platform\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/kb.n0c.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Activate Hot-Link Protection Manually - N0C KB","description":"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.","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:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/","og_locale":"en_US","og_type":"article","og_title":"How to Activate Hot-Link Protection Manually - N0C KB","og_description":"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.","og_url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/","og_site_name":"N0C KB","article_modified_time":"2026-07-22T16:50:43+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/","url":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/","name":"How to Activate Hot-Link Protection Manually - N0C KB","isPartOf":{"@id":"https:\/\/kb.n0c.com\/#website"},"datePublished":"2021-01-11T19:18:33+00:00","dateModified":"2026-07-22T16:50:43+00:00","description":"This article explains how to protect your website from hot-links using an .htaccess (hypertext access) file.","breadcrumb":{"@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/kb.n0c.com\/en\/knowledge-base\/manual-activation-of-hot-link-protection\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/kb.n0c.com\/"},{"@type":"ListItem","position":2,"name":"Articles","item":"https:\/\/kb.n0c.com\/en\/knowledge-base\/"},{"@type":"ListItem","position":3,"name":"How to Activate Hot-Link Protection Manually"}]},{"@type":"WebSite","@id":"https:\/\/kb.n0c.com\/#website","url":"https:\/\/kb.n0c.com\/","name":"N0C KB","description":"Official documentation of the N0C hosting platform","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/kb.n0c.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb"}],"about":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/types\/ht_kb"}],"author":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/comments?post=2673"}],"version-history":[{"count":6,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2673\/revisions"}],"predecessor-version":[{"id":23489,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb\/2673\/revisions\/23489"}],"wp:attachment":[{"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/media?parent=2673"}],"wp:term":[{"taxonomy":"ht_kb_category","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-category?post=2673"},{"taxonomy":"ht_kb_tag","embeddable":true,"href":"https:\/\/kb.n0c.com\/en\/wp-json\/wp\/v2\/ht-kb-tag?post=2673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}