SimonHosting
  • Best Web Hosting
  • Reviews
  • Deals
  • Comparisons
  • Tutorials
No Result
View All Result
Best Web Hosting
SimonHosting
  • Best Web Hosting
  • Reviews
  • Deals
  • Comparisons
  • Tutorials
No Result
View All Result
SimonHosting
No Result
View All Result

How to Set Up Hotlink Protection in cPanel

Alfredo Vilar by Alfredo Vilar
October 17, 2026
in Tutorials
How to Set Up Hotlink Protection in cPanel
📋Editorial transparency: Some links in this guide are affiliate links; if you purchase, we may earn a commission at no extra cost to you. This never influences our recommendations or the instructions we publish.

Learning how to set up hotlink protection in cPanel stops third-party websites from embedding your images, PDFs, or media files directly on their pages. When another site links directly to your files, your hosting server pays the bandwidth cost every time a visitor loads their page. Enabling this built-in security tool takes less than five minutes and blocks unauthorized domains from draining your server resources.

This guide walks website owners and WordPress beginners through the exact settings in both the standard cPanel Jupiter interface and the newer cPanel Meridian interface. If you use a cPanel provider from our list of the best WordPress hosting providers, you already have access to this feature at no extra cost.

What You Need Before You Start

Before changing how your server handles incoming file requests, gather a few details so you do not accidentally block your own pages or email newsletters from displaying images.

  • cPanel login credentials: You need access to your hosting control panel through a provider such as HostArmada or InMotion Hosting.
  • A complete list of your domains and subdomains: Prepare every URL that legitimately displays your images, including http://, https://, www, and non-www variations.
  • External service URLs: Note any staging subdomains, external newsletter platforms, or partner sites that need permission to load your media files.
  • A backup of your configuration file: Hotlink Protection writes rules directly to your .htaccess file in your document root directory.
⚠️

Back up your .htaccess file first

Enabling Hotlink Protection modifies your site’s .htaccess file automatically. Before proceeding, open cPanel File Manager, enable Show Hidden Files in Settings, and download a copy of your current .htaccess file so you can restore it if needed.

Step 1: Open the Hotlink Protection Interface in cPanel

According to official cPanel & WHM documentation, the exact path to the Hotlink Protection tool depends on whether your web host uses the standard Jupiter theme or the newer Meridian interface. Most shared and WordPress plans, including those covered in our HostArmada review, use the standard Tools dashboard.

  1. Log in to your cPanel account dashboard.
  2. Scroll down to the Security section on the Tools page.
  3. Click Hotlink Protection.
  4. If your host uses the newer cPanel Meridian interface, open the Security hub from the navigation menu, select the Protection tab, and locate the Hotlink Protection section.
ℹ️

Don't see the Hotlink Protection icon?

According to cPanel documentation, hosting providers can hide this tool in WHM’s Feature Manager. Furthermore, servers running pure NGINX do not support .htaccess rules; if the icon is missing, ask your host’s support team to enable it or check if your plan uses Apache or LiteSpeed.

Step 2: Enable Hotlink Protection

Once you open the interface, you must activate the feature so the server begins inspecting the HTTP referrer header on incoming file requests. If you manage your site on a traditional cPanel host like the one evaluated in our InMotion Hosting review, you will see an immediate confirmation page.

  1. Click the Enable button at the top of the Hotlink Protection page.
  2. Wait for cPanel to open a confirmation view that displays the Allowed referrers and Protected extension lists.
  3. Click Go back to return to the main configuration screen so you can customize your rules.
  4. If you are using the Meridian interface, simply switch the toggle in the Hotlink Protection section so the status label changes to Hotlink protection enabled.

Step 3: Configure Your Allowed Referrer URLs

When hotlink protection is active, cPanel blocks every external site unless its domain appears on your allowed list. By default, cPanel populates your primary domain, addon domains, and subdomains automatically, but you should always verify that every variation is present.

  1. Locate the URLs to allow access text box (labeled Allowed referrer URLs in the Meridian interface).
  2. Verify that all four core variations of your primary domain are listed on separate lines: http://example.com, https://example.com, http://www.example.com, and https://www.example.com.
  3. Add any subdomains where you view or edit content, such as a staging site or the URL you use to access your cPanel account.
  4. Add any external websites, client portals, or third-party domains that have your permission to embed your media files.
  5. In the Meridian interface, type each URL into the Allowed referrer URLs field and click Add after each entry.

Here is what a complete allowed list looks like for a standard website with a staging subdomain:

http://example.com

https://example.com

http://www.example.com

https://www.example.com

https://staging.example.com

Step 4: Choose Which File Extensions to Protect

Next, tell cPanel which specific file types should be protected from unauthorized embedding. According to cPanel’s documentation, the tool starts you off with common image formats so your web pages and stylesheets continue to function normally.

  1. Find the Block direct access for the following extensions (also, separate by commas) text box.
  2. Review the default extensions, which typically include jpg,jpeg,gif,png,bmp.
  3. Add modern web image, audio, video, or document extensions separated by commas without spaces or periods, such as webp,avif,svg,mp4,mp3,pdf,zip.
  4. If your host uses the Meridian interface, review the Protected file types list, type new extensions into Add more…, or click the Images, Documents, or Audio/Video quick-add buttons.

The table below shows which extensions to include based on the content your website hosts:

Content CategoryRecommended Extensions to ProtectWhen to Use
Standard Web Imagesjpg,jpeg,gif,png,bmp,webp,avif,svgEvery website, blog, and online store
Audio and Video Mediamp4,webm,mp3,wav,oggSelf-hosted podcasts, video tutorials, or product demos
Downloadable Documentspdf,zip,doc,docxLead magnets, user manuals, or digital downloads

Step 5: Allow Direct Requests (Recommended for Normal Browsing)

A “direct request” happens when a visitor types an image or PDF URL directly into their browser address bar, opens an image in a new tab, or clicks a link from an email client or bookmark. Because these actions do not send an HTTP referrer header from a web page, blocking direct requests can break legitimate visitor behavior.

  1. Locate the Allow direct requests checkbox below the file extensions box.
  2. Select the Allow direct requests checkbox so it is checked.
  3. If you are on the Meridian interface, look for the Block direct requests (no referrer) setting and leave it disabled if you want visitors to open direct file links, PDFs, or RSS feed images without errors.
💡

Why you should allow direct requests

Modern browsers, privacy extensions, and email apps frequently strip HTTP referrer data for privacy reasons. Leaving Allow direct requests checked prevents legitimate visitors from seeing broken images while still blocking other websites that embed your files in their HTML.

Step 6: Set an Optional Redirect URL and Save Your Changes

By default, cPanel returns a standard 403 Forbidden error whenever an unauthorized site tries to load a protected file. You also have the option to redirect hotlinked requests to a specific URL, such as a warning graphic or a landing page, though you must never redirect to a file extension that is on your protected list or you will cause an infinite redirect loop.

  1. Locate the Redirect the request to the following URL field (or choose between Return 403 Forbidden and Redirect to URL under When a hotlink is detected in Meridian).
  2. Leave the redirect box blank to serve a standard 403 Forbidden response, which uses the least server bandwidth.
  3. Click Submit at the bottom of the screen to write the rules to your .htaccess file.

How to Check It Worked

After clicking Submit, you can verify that cPanel wrote the rules properly by inspecting your .htaccess file or testing an image from an external domain. If you also use cPanel on other providers such as the one covered in our Hosting.com review, the generated Apache rewrite block looks identical across hosts.

  1. Open cPanel File Manager and navigate to your public_html directory.
  2. Right-click your .htaccess file and select View or Edit.
  3. Look for the block enclosed by RewriteEngine on that checks HTTP_REFERER against your allowed domains for your chosen file extensions.
  4. Clear your browser cache and load your website’s homepage and media-heavy posts in a private or incognito window to confirm all your images still load properly.
Hosting offer: ScalaHostingMy #1 Hosting Pick
ScalaHosting logo

ScalaHosting

9.8/10 overall

The best all-around web host for performance, security, and support, independently owned and built around its own SPanel technology.

  • SPanel control panel
  • SShield security
  • Managed cloud VPS
  • Flexible scaling
  • Independent ownership
Up to
75% OFF

plans from $2.95/mo

Visit ScalaHosting↗ View offer on provider website

* Introductory price. Renewal rates apply. Anytime money-back guarantee.

Check out my ScalaHosting Review and grab the latest discount on my #1 web hosting pick for 2026.

If you are comparing different control panels and server setups, you can also explore the best cheap hosting plans or see our ScalaHosting review for a look at managed VPS plans that include generous bandwidth allocations.

Troubleshooting Common Hotlink Protection Issues

Because hotlink protection relies on HTTP referrer headers and .htaccess rewrite rules, a minor oversight in your allowed list can hide images where you actually want them to appear. Here is how to fix the four most common problems.

1. Images Disappeared on Your Own Website

If images stop loading on your own site immediately after you click Submit, you likely missed a protocol or subdomain variation in the URLs to allow access list. Open Hotlink Protection in cPanel, verify that both http:// and https:// as well as www and non-www versions of your domain are listed, and click Submit again.

2. Social Media Previews (Facebook, X, LinkedIn) Are Blank

Social networks fetch your Open Graph featured images when someone shares a link to your post. If Allow direct requests is unchecked, or if the social platform sends its own domain as the referrer, cPanel blocks the preview image; enable Allow direct requests or add the social network’s referrer domain to your allowed list.

3. Images Do Not Load in Email Newsletters or RSS Readers

Webmail clients (such as Gmail or Outlook on the web) and RSS feed readers load images from their own domain URLs or strip the referrer header entirely. Either check Allow direct requests and add common webmail domains to URLs to allow access, or upload newsletter graphics directly inside your email marketing platform instead of linking to your WordPress media library.

4. Disabling Hotlink Protection Deleted Your Allowed URLs List

According to official cPanel documentation, clicking the Disable button in the Hotlink Protection interface permanently deletes all custom entries in the URLs to allow access list. Always copy your allowed URLs to a plain text file on your computer before clicking Disable so you do not have to type them all over again.

⚠️

Save your allowed URLs before disabling

Clicking Disable in cPanel’s Hotlink Protection screen wipes your custom allowed URL list. Copy your list of domains to a local text file before turning the feature off for testing.

FAQ

What does Hotlink Protection in cPanel actually do?

Hotlink Protection in cPanel adds Apache rewrite rules to your .htaccess file that check the HTTP_REFERER header of every request for protected file extensions. If another website embeds your image using an HTML <img> tag and its domain is not on your allowed list, your server blocks the request with a 403 Forbidden error or redirects it.

Does cPanel Hotlink Protection block Google Images or hurt SEO?

Properly configured Hotlink Protection can block search engine image crawlers if you do not allow direct requests or search engine referrers. To keep your images indexed in Google Images and Bing, make sure Allow direct requests is checked and test your image URLs using Google Search Console’s URL Inspection tool.

Should I include periods before file extensions in cPanel Hotlink Protection?

In the standard cPanel Jupiter interface, enter file extensions separated by commas without periods or spaces, such as jpg,jpeg,png,gif,webp. Although cPanel’s documentation notes that the parser strips leading periods in newer versions, following the comma-separated format shown in the default field prevents syntax issues in your .htaccess file.

Can I use cPanel Hotlink Protection with Cloudflare?

Yes, you can use cPanel Hotlink Protection alongside Cloudflare, or you can enable Cloudflare’s own Scrape Shield Hotlink Protection in your Cloudflare dashboard. Bear in mind that if Cloudflare caches your images at the edge, requests served from Cloudflare’s cache do not hit your origin cPanel server until the cache expires, so enabling hotlink protection in Cloudflare’s dashboard is more effective for proxied domains.

Next Steps

Now that your server blocks unauthorized sites from leeching your media bandwidth, review your overall security and bandwidth usage in cPanel’s Metrics and Security sections. If you want to compare hosts that bundle extra server-side security and fast storage, read our guide to the best VPS hosting or see how top cPanel and custom-panel providers stack up below.

Read next

  • Best WordPress Hosting Providers Compared
  • HostArmada Review: Performance, Pricing, and cPanel Features
  • InMotion Hosting Review: Is It Worth the Price?

You might also like

How to Set Up a 301 Redirect in cPanel and Test the Destination

How to Set Up a 301 Redirect in cPanel and Test the Destination

October 17, 2026
How to Use the Zone Editor to Add or Edit DNS Records

How to Use the Zone Editor to Add or Edit DNS Records

October 17, 2026
How to Change Your cPanel Password and Update Contact Information

How to Change Your cPanel Password and Update Contact Information

October 17, 2026
How to Enable Two-Factor Authentication for Your cPanel Login

How to Enable Two-Factor Authentication for Your cPanel Login

October 17, 2026
Alfredo Vilar

Alfredo Vilar

Alfredo Vilar reviews web hosting, VPS, and managed cloud services. He has 10 years of expertise in WordPress and nearly a decade of experience as a cloud engineer. He focuses on real-world performance rather than marketing claims, and he has worked with many providers. He is experienced with cPanel, web development, AI-assisted coding, Astro, VPS setups, and hosting scalability. He also runs the YouTube channel SimonHosting (2K subscribers), where he has covered cloud, web hosting, and website development for over four years.

Related articles

How to Set Up a 301 Redirect in cPanel and Test the Destination

How to Set Up a 301 Redirect in cPanel and Test the Destination

by Alfredo Vilar
October 17, 2026

Editorial transparency: Some links in this guide are affiliate links; if you purchase, we may earn a commission at no...

How to Use the Zone Editor to Add or Edit DNS Records

How to Use the Zone Editor to Add or Edit DNS Records

by Alfredo Vilar
October 17, 2026

Editorial transparency: Some links in this guide are affiliate links; if you purchase, we may earn a commission at no...

How to Change Your cPanel Password and Update Contact Information

How to Change Your cPanel Password and Update Contact Information

by Alfredo Vilar
October 17, 2026

Editorial transparency: Some links in this guide are affiliate links; if you purchase, we may earn a commission at no...

How to Enable Two-Factor Authentication for Your cPanel Login

How to Enable Two-Factor Authentication for Your cPanel Login

by Alfredo Vilar
October 17, 2026

Editorial transparency: Some links in this guide are affiliate links; if you purchase, we may earn a commission at no...

Next Post
How to Create and Manage Email Accounts in cPanel

How to Create and Manage Email Accounts in cPanel

Recommended

ScalaHosting Review 2026 My Honest Test After 1 Year

ScalaHosting Review 2026: My Honest Test After 1 Year

ScalaHosting Coupon 2026_ Early Black Friday Deal

ScalaHosting Coupon 2026: Early Black Friday Deal

October 28, 2026
Best Managed VPS Hosting Deals 2026: Up to 73% Off

Best Managed VPS Hosting Deals 2026: Up to 73% Off

October 28, 2026
Kinsta Review

Kinsta Review 2026: Is Premium Managed WordPress Hosting Worth It?

Contabo Review

Contabo Review 2026: Honest VPS Test Results and Verdict

October 28, 2026
Best n8n Hosting Providers 2026

Best n8n Hosting Providers 2026 (Tested & Ranked)

October 6, 2026
Best Web Hosting in Australia 2026

Best Web Hosting in Australia 2026 (Tested & Ranked)

October 6, 2026
Black Friday Offer: ScalaHostingMy #1 Pick
ScalaHosting logo

ScalaHosting

9.8/10 overall

Managed Cloud VPS Hosting for bloggers, ecommerce, online businesses, and growing WordPress sites.

  • Dedicated CPU and RAM
  • Fully managed service
  • Free website migration
72% OFF

Entry Cloud plan

Claim 72% off↗ View offer on provider website

72% off the Entry Cloud plan. Check billing term, renewal pricing, and current provider terms.

  • About Us
  • Contact
  • Privacy Policy
  • Terms & Conditions

No Result
View All Result
  • Best Web Hosting
  • Reviews
  • Deals
  • Comparisons
  • Tutorials