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-wwwvariations. - 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
.htaccessfile 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.
- Log in to your cPanel account dashboard.
- Scroll down to the Security section on the Tools page.
- Click Hotlink Protection.
- 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.
- Click the Enable button at the top of the Hotlink Protection page.
- Wait for cPanel to open a confirmation view that displays the Allowed referrers and Protected extension lists.
- Click Go back to return to the main configuration screen so you can customize your rules.
- 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.
- Locate the URLs to allow access text box (labeled Allowed referrer URLs in the Meridian interface).
- 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, andhttps://www.example.com. - Add any subdomains where you view or edit content, such as a staging site or the URL you use to access your cPanel account.
- Add any external websites, client portals, or third-party domains that have your permission to embed your media files.
- 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.comStep 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.
- Find the Block direct access for the following extensions (also, separate by commas) text box.
- Review the default extensions, which typically include
jpg,jpeg,gif,png,bmp. - 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. - 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 Category | Recommended Extensions to Protect | When to Use |
|---|---|---|
| Standard Web Images | jpg,jpeg,gif,png,bmp,webp,avif,svg | Every website, blog, and online store |
| Audio and Video Media | mp4,webm,mp3,wav,ogg | Self-hosted podcasts, video tutorials, or product demos |
| Downloadable Documents | pdf,zip,doc,docx | Lead 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.
- Locate the Allow direct requests checkbox below the file extensions box.
- Select the Allow direct requests checkbox so it is checked.
- 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.
- 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).
- Leave the redirect box blank to serve a standard
403 Forbiddenresponse, which uses the least server bandwidth. - Click Submit at the bottom of the screen to write the rules to your
.htaccessfile.
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.
- Open cPanel File Manager and navigate to your
public_htmldirectory. - Right-click your
.htaccessfile and select View or Edit. - Look for the block enclosed by
RewriteEngine onthat checksHTTP_REFERERagainst your allowed domains for your chosen file extensions. - 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.

ScalaHosting
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
* 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.
















