CALL (239) 961-8285
ENDURTECH
  • Web Services
    • Web Design
      • Design and Development
      • Web Consulting and Tutoring
      • Hosting and Maintenance
      • Project Portfolio
    • Media
      • Photo and Audio, Video Editing
      • Social Media Management
      • All Web Related Services
    • Marketing
      • Digital Marketing and Branding
      • Search Engine Optimization
    • Client Portal
      • Remote Web Support
      • Web Services Payment
      • Scheduled Payments
  • Tech Support
    • Services
      • Computer Support and Repair
      • Data Backup and Recovery
      • Computer Security, Virus Removal
      • Computer Networking Support
      • Computer Consulting & Tutoring
      • All Technology Related Services
    • Blockchain
      • Blockchain Technology
      • Cryptocurrency Articles
    • Client Portal
      • Remote PC Support
      • Remote Monitoring & Management
      • Tech Services Payment
  • Articles
  • About
  • Talk to Me
  • Menu Menu

How to Prevent Hotlinking

Apache, Security, Snippet, Technology Support, Web Hosting, Web Security, Web Site Support, WordPress

Hotlinking is the act of linking to a file that is hosted on another site, instead of downloading the file and hosting it on your own server. With proper source citation of course.

Images are most frequently hotlinked filetype, but zip, PDF and other digital assets can also be hotlinked.

Since hotlinking requires the website server hosting the file to use its own bandwidth to load it on the offending site, it’s considered bad etiquette. Others go further and call it theft. That’s because it eats up the bandwidth of the site you took it from without giving them the benefit of increased traffic or credit.

In this article I show you how to block others from hotlinking various filetypes from your web server. To spare your server from other undesired traffic, read my article on a list of web crawlers to block.

 

What is hotlinking protection?

Hotlinking protection is the practice of protecting a website’s content so that only authorized users have access to it. This is important because the effect of hotlinking can be detrimental to websites, leading to excessive usage of server resources, slow page loading times, and increased hosting costs without any benefits to the site owner.

By investing in hotlinking prevention, you can save valuable bandwidth and increase your website’s speed and performance. Additionally, hotlinking prevention can safeguard your website from being associated with other less reputable sites that may be hotlinking to your content. This tactic can help search engines recognize that your site is of higher quality and more professional than those that allow hotlinking.

Below is a variety of preventive and reactive measures you can take to stop users from hotlinking your files. Doing so can help protect your bandwidth and optimize your website performance.

1. Use a CDN with hotlink protection.

The easiest and safest way to prevent hotlinking is to use a CDN that offers built-in hotlinking protection.

For example, Cloudflare offers hotlink protection to prevent other websites from linking to your image resources or abusing your bandwidth. Once enabled, this feature will block websites from linking directly to your image resources.

They can still view and download images from your website, however, which means they could properly download, host, and cite images from your website.

Please note that this type of hotlink protection may interfere with crawling bots such as Googlebot, preventing them from accessing and indexing your content.

Enable the hotlink protection feature in Cloudflare CDN’s Scrape shilef app.

2. htaccess Hotlink Protection.

To prevent hotlinking on your website, you can add the following snippet of code to your hypertext access file (.htaccess).

RewriteEngine on (add this line if not already there above the hotlink protection script below)

# HOTLINK PROTECTION
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)example.com/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)example.com/.*$ [NC]
RewriteRule .*.(gif|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|pdf)$ – [F,NC]
# HOTLINK PROTECTION END

NOTE: If your website is hosted through SiteGround, the Hotlink protection (via .htaccess) will not work with NGINX Direct Delivery enabled. You can disable it from your Site Tools > Speed > Caching.

 

Conclusion

I hope my article on how to prevent others from hotlinking your content has been helpful to you. I welcome your thoughts, questions or suggestions regarding this article.

You may support my work and future improvements by sending me a tip using your Brave browser or by sending me a one time donation using your credit card.

Let me know if you found any errors within my article or if I may further assist you by answering any additional questions you may have.

 

August 15, 2024
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on LinkedIn
  • Share on Reddit
  • Share by Mail
https://endurtech.com/wp-content/uploads/2024/08/How-to-Add-Hotlink-Protection-to-your-Website.jpg 900 1200 Manny https://endurtech.com/wp-content/uploads/2018/04/endurtech-logo.png Manny2024-08-15 08:00:482024-08-22 16:47:00How to Prevent Hotlinking
Search Search

CONNECT WITH US

This field is for validation purposes and should be left unchanged.
Engagement*

Want to say, "thanks"?
Leave me a review on Facebook and/or Google.

You can send me a tip using your Brave browser. Get Brave!

Only used to send you a receipt.
Include a Message
Popular
  • Windows Logo
    Second Monitor on Windows 10 Resets After SleepJuly 2, 2020 - 6:30 am
  • Windows Logo
    How to Disable the F1 Help Key in Windows 10April 15, 2021 - 2:40 pm
  • Cortana Logo
    How to Disable Microsoft’s CortanaApril 6, 2021 - 9:00 am
  • Firefox Logo
    How to Remove All Passwords from Lockwise in FirefoxMarch 26, 2020 - 11:00 am
Recent
  • How to Fix Brother BrLog Errors
    How to Fix Brother BrLog ErrorsAugust 24, 2026 - 10:55 am
  • How to block Facebook crawler
    List of Spider Crawlers to BlockAugust 10, 2026 - 9:20 am
  • Brave Browser Logo
    How to Fix the “Not Secure” Address Bar Err...July 20, 2026 - 12:48 pm
  • Linkpull Extension By Endurtech
    LinkPull Extension, Grab Any File From a URLJuly 7, 2026 - 7:35 pm

STAY IN TOUCH

ENDURTECH Web Design Company Naples, Florida

Endurtech GitHub ProfileEndurtech YouTube ChannelEndurtech LinkedIn ProfileEndurtech Facebook Page

5 Star Google Review for Endurtech - Naples Web Design Company

Learn More & Connect

Search Search
ENDURTECH Logo
Endurtech GitHub ProfileEndurtech YouTube ChannelEndurtech LinkedIn ProfileEndurtech Facebook Page

5 Star Google Review for Endurtech - Naples Web Design Company

Latest Articles

  • How to Fix Brother BrLog Errors
    How to Fix Brother BrLog ErrorsAugust 24, 2026 - 10:55 am
  • How to block Facebook crawler
    List of Spider Crawlers to BlockAugust 10, 2026 - 9:20 am
  • Brave Browser Logo
    How to Fix the “Not Secure” Address Bar ErrorJuly 20, 2026 - 12:48 pm
  • Linkpull Extension By Endurtech
    LinkPull Extension, Grab Any File From a URLJuly 7, 2026 - 7:35 pm

Recent Projects

  • Jewelry Website Gems of Note
    Gems of NoteNovember 15, 2019 - 10:16 pm
  • Gift Store Facebook Business Page Cover Video
    Gift Store Facebook Business Page Cover VideoApril 13, 2019 - 3:58 pm
  • Toledo Yoga BrandBot Footer Integration
    Toledo YogaApril 9, 2019 - 7:26 am
  • Lawyer Association Website with Member Portal
    National Employment Lawyers Association, Florida ChapterFebruary 26, 2019 - 8:00 am

Business Details

Mondays - Fridays
9:00 am - 5:00 pm
Eastern Standard Time
After hours by appointment

SUPPORT PHONE

(239) 961-8285

MAILING ADDRESS

59 Logan Ln.
Lynchburg, VA 24502

Copyright © 2026 ENDURTECH ® All Rights Reserved. Legal
Link to: Undo Don’t Recommend Channel on YouTube Link to: Undo Don’t Recommend Channel on YouTube Undo Don’t Recommend Channel on YouTubeYouTube Logo Link to: Whitelist, Allowlist Email or Domain in Apple Mail App Link to: Whitelist, Allowlist Email or Domain in Apple Mail App Apple LogoWhitelist, Allowlist Email or Domain in Apple Mail App
Scroll to top Scroll to top Scroll to top