{"id":711,"date":"2024-11-06T12:15:16","date_gmt":"2024-11-06T12:15:16","guid":{"rendered":"https:\/\/www.salemwebhosting.in\/articles\/?p=711"},"modified":"2024-11-06T12:26:45","modified_gmt":"2024-11-06T12:26:45","slug":"hotlink-protection-in-cpanel","status":"publish","type":"post","link":"https:\/\/www.salemwebhosting.in\/articles\/hotlink-protection-in-cpanel\/","title":{"rendered":"Setting Up Hotlink Protection in cPanel"},"content":{"rendered":"<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"712\" height=\"400\" src=\"https:\/\/www.salemwebhosting.in\/articles\/wp-content\/uploads\/2024\/11\/image-2955.png\" alt=\"Hotlink Protection in cPanel\" class=\"wp-image-714\" style=\"width:627px;height:auto\" srcset=\"https:\/\/www.salemwebhosting.in\/articles\/wp-content\/uploads\/2024\/11\/image-2955.png 712w, https:\/\/www.salemwebhosting.in\/articles\/wp-content\/uploads\/2024\/11\/image-2955-300x169.png 300w\" sizes=\"auto, (max-width: 712px) 100vw, 712px\" \/><\/figure>\n<\/div>\n\n\n<p>Hotlink Protection in cPanel &#8211; Hotlinking is when another website directly links to the files (like images, videos, or other media) hosted on your website, essentially using your bandwidth to serve their content. This can slow down your site, increase your hosting costs, and even affect your site\u2019s performance. Luckily, cPanel makes it easy to set up Hotlink Protection, a feature that blocks unauthorized websites from using your resources. Here\u2019s a straightforward guide to help you enable Hotlink Protection in cPanel.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#why-enable-hotlink-protection\">Why Enable Hotlink Protection?<\/a><\/li><li><a href=\"#accessing-hotlink-protection-in-c-panel\">Accessing Hotlink Protection in cPanel<\/a><\/li><li><a href=\"#configuring-hotlink-protection-settings\">Configuring Hotlink Protection Settings<\/a><\/li><li><a href=\"#testing-hotlink-protection\">Testing Hotlink Protection<\/a><\/li><li><a href=\"#troubleshooting-hotlink-protection\">Troubleshooting Hotlink Protection<\/a><\/li><li><a href=\"#final-thoughts-on-hotlink-protection\">Final Thoughts on Hotlink Protection<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-enable-hotlink-protection\"><strong>Why Enable Hotlink Protection?<\/strong><\/h3>\n\n\n\n<p>Hotlink Protection is important because:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>It Saves Bandwidth:<\/strong> Since hotlinking uses your bandwidth, preventing it can reduce your usage and save on hosting costs.<\/li>\n\n\n\n<li><strong>Improves Site Performance:<\/strong> If your resources are protected, you free up bandwidth for your own visitors, leading to better site speed.<\/li>\n\n\n\n<li><strong>Protects Your Content:<\/strong> Hotlink Protection keeps other <a href=\"https:\/\/www.salemwebhosting.in\/\" data-type=\"link\" data-id=\"https:\/\/www.salemwebhosting.in\/\">websites<\/a> from displaying your content as their own, helping preserve your brand and images.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"accessing-hotlink-protection-in-c-panel\"><strong>Accessing Hotlink Protection in cPanel<\/strong><\/h3>\n\n\n\n<p>To start, log in to your cPanel account:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>In the cPanel dashboard, navigate to the <strong>Security<\/strong> section.<\/li>\n\n\n\n<li>Click on <strong>Hotlink Protection<\/strong> to access the settings page.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configuring-hotlink-protection-settings\"><strong>Configuring Hotlink Protection Settings<\/strong><\/h3>\n\n\n\n<p>Here\u2019s how to set up Hotlink Protection effectively:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enable Hotlink Protection:<\/strong> First, check that Hotlink Protection is enabled by clicking on the \u201cEnable\u201d button if it\u2019s not already active.<\/li>\n\n\n\n<li><strong>Specify Allowed Domains:<\/strong> Add your website\u2019s domain(s) in the <strong>URLs to allow access<\/strong> field. This list should include your primary domain (like <code>example.com<\/code>) and any other domains or subdomains that you control (e.g., <code>www.example.com<\/code>, <code>sub.example.com<\/code>). These domains will still be able to access your files directly.<\/li>\n\n\n\n<li><strong>Block Direct Access to Specific File Types:<\/strong> In the <strong>Block direct access for these extensions<\/strong> field, specify which file types you want to protect. Common file types include:<ul><li><code>.jpg<\/code>, <code>.jpeg<\/code>, <code>.png<\/code>, <code>.gif<\/code> (for images)<\/li><li><code>.mp4<\/code>, <code>.avi<\/code> (for videos)<\/li><li><code>.pdf<\/code> (for documents)<\/li><\/ul>These extensions help you control which file types are protected from hotlinking.<\/li>\n\n\n\n<li><strong>Redirect Requests to Another URL (Optional):<\/strong> You can choose to redirect users trying to access your content directly to a different URL, such as a custom error page or another page on your website. This is optional, but it can be useful if you want to inform others that the content is protected.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"testing-hotlink-protection\"><strong>Testing Hotlink Protection<\/strong><\/h3>\n\n\n\n<p>After enabling Hotlink Protection, it\u2019s a good idea to test it to ensure it\u2019s working as expected.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Open a New Browser Window<\/strong> and try to access one of your protected images or files by directly entering its URL in the address bar.<\/li>\n\n\n\n<li><strong>Check External Links<\/strong>: Visit a non-allowed domain and attempt to load one of your protected images or files. If Hotlink Protection is working, the content should not load on unauthorized sites.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"troubleshooting-hotlink-protection\"><strong>Troubleshooting Hotlink Protection<\/strong><\/h3>\n\n\n\n<p>If you experience any issues with Hotlink Protection:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Clear Your Browser Cache:<\/strong> Sometimes your browser might cache previous content, so clear the cache to see if Hotlink Protection is active.<\/li>\n\n\n\n<li><strong>Check File Types:<\/strong> Ensure that the file extensions you want to protect are correctly listed in the settings.<\/li>\n\n\n\n<li><strong>Verify Allowed Domains:<\/strong> Double-check that your allowed domains are correctly listed to avoid blocking your own website.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"final-thoughts-on-hotlink-protection\"><strong>Final Thoughts on Hotlink Protection<\/strong><\/h3>\n\n\n\n<p>Enabling Hotlink Protection is a simple but powerful way to keep your website\u2019s resources protected, save bandwidth, and improve performance. It takes just a few clicks in <a href=\"https:\/\/www.cpanel.net\/\" rel=\"nofollow noopener\" target=\"_blank\">cPanel<\/a>, but it can make a big difference in maintaining control over your content and ensuring your site\u2019s resources are used only for your visitors.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hotlink Protection in cPanel &#8211; Hotlinking is when another website directly links to the files (like images, videos, or other media) hosted on your website, essentially using your bandwidth to serve their content. This can slow down your site, increase your hosting costs, and even affect your site\u2019s performance. Luckily, cPanel makes it easy to&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[54],"tags":[],"class_list":["post-711","post","type-post","status-publish","format-standard","hentry","category-hotlink-protection"],"_links":{"self":[{"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/posts\/711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/comments?post=711"}],"version-history":[{"count":3,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/posts\/711\/revisions"}],"predecessor-version":[{"id":715,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/posts\/711\/revisions\/715"}],"wp:attachment":[{"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/media?parent=711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/categories?post=711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.salemwebhosting.in\/articles\/wp-json\/wp\/v2\/tags?post=711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}