There is nothing worse than someone stealing images or bandwidth, but this often happens because everything on the Internet is public and people can easily link to it. If this person links to an inventory photo that you must obtain permission to use, it may cost server bandwidth, traffic, or your money.
Today we will explain what a theft chain is, why it is bad, and how to prevent others from stealing links on your WordPress site.
- , what is hotlink?
- Why is hotlink hotlink not good
- hotlink protection will affect SEO? How does
- protect against hotlink
- how to submit DMCA delete notify
hide
hotlink is very simple. You can find the image somewhere on the Internet and then use the URL of the image directly on your site. This picture will be displayed on your website, but will be provided from the original location. This is very convenient for pirates, but it is actually theft because it uses the resources of the hotlink site. It’s like getting in the car and driving away the gasoline we sucked from our neighbor’s car. Why
is not good
here are a few things to pay attention to when stealing links:
1. Piracy costs the money of the original website owner
someone who links to your picture from their site may not seem like a big deal, but it may bring you a lot of extra cost. Oatmeal is a good example. The Huffington Post hot link to one of his cartoons consisting of multiple pictures. Because we’re talking about a major publication with a lot of traffic, this brings a lot of additional costs to The Oatmeal because thousands of people are receiving these images. In the classic Oatmeal initiative, Matthew Inman, the creator of The Oatmeal, replaced all the hot link files with the following:
, an example of
hotlink, he also carefully replaced the last picture with a picture with “back” and “pee”. Amazing! But as you can see, costs can increase rapidly, especially if high-traffic sites are your content hotlink sites. Do you want to believe that all writers and bloggers know how to use images correctly? Maybe not. This is why hotlink protection exists.
2. Hotlink is illegal in most cases
in many cases, hotlink is actually illegal. Why? Because many of the photos you see on the Internet have license restrictions attached. Here are some common image restrictions that limit the license of popular photo sites:
“does not allow commercial use under any circumstances.”
- “articles published on websites or blogs you own (for illustrative purposes only in articles or news).”
- if someone links to your picture and uses it on their website, both of these restrictions can easily be broken. They probably don’t have the permission to do so because they don’t pay for the license. This is also closely related to not correctly linking to it on their website, but also to the correct attribution of the original creator.
3. Running out of server resources
hotlink may consume a lot of resources of the target server. Imagine if you are on a shared WordPress host and the Huffington Post suddenly links to your image. The number of queries per hour on your site may increase from hundreds to hundreds of thousands. This may even cause your host account to be suspended. This is definitely the reason not only to use high-performance hosts (which can handle hiccups like this), but also to enable hot link protection to prevent this from happening.
4. Stealing chains is just lazy
. Do people steal chains just because they are lazy? Well, a lot of times, people don’t intentionally heat link to your image, and don’t know it’s even a problem. They are usually just busy writing, just copying and pasting URL and files. They may not even know how to properly link to an image. However, this is still not a good excuse. If you are writing content on the web, it is important to understand the images linked to others and best practices for proper attribution. Will
hotlink protection affect SEO?
preventing others from stealing links will not affect SEO, but it does need to be set up correctly. Crawlers from Google, Bing, Yahoo, and so on need to access your images in order to index and display them correctly. For example, when you see a picture in a Google image search, thumbnails are provided from Google’s image cache. But the original version (if you click it) is actually provided from your server. Hotlink
in
Google image search and you want to use your image in Google image search. As WordStream said, Google image search traffic is an “easy win” that can actually bring transformation and potential customers to your business, otherwise you may not be able to get it. How to protect
from hotlink
there are several simple ways to protect your images from hotlinks. Let’s take a look at the options we have.
WordPress plug-in
- CDN
- Apache
- NGINX
- disables right-click copy
- rename file
- With CDN
- cPanel
with hot link protection, most of you provide content around the world through your own website, and in turn use CDN providers to speed up asset delivery. CDN providers such as KeyCDN and Cloudflare have built-in powerful hot link protection for free, and you can enable them. This is the recommended method because they have very fine-tuned rules for robots and other references that should not actually be stopped. Another benefit of doing this on CDN is that you do not need to make any changes to the WordPress installation.
If you use KeyCDN, simply click Zonereferrers and add the rule. The crawl tool can still access and index your image.
KeyCDN hotlink protection
they even have an one-click option that allows each area to be an empty referral source.
KeyCDN allows null references to
, which enables hot link protection for assets on your CDN, not your source server. Therefore, if you are very worried about someone stealing your image directly on your server, you can also enable hotlink protection on the source server (see Apache and NGINX rules below). This is unlikely because someone has to delete the CDN URL manually. But it could happen.
if you are using Cloudflare, you can easily enable hotlink protection under Scrape Shield in your account. Hotlink protection has no effect on crawling, but prevents images from being displayed on sites such as Google Images and Pinterest. Because Cloudflare is a full proxy service, you do not need to worry about enabling hotlink protection on the source server.
Cloudflare hotlink protection
if you are using Amazon S3, you can use the bucket policy to enable hot link protection, which is located under “Permissions” of the bucket.
Amazon S3 hotlink protection
simply add the following code:
Enable hotlink protection
{ "Version": "2008-10-17", "Id": "preventHotLinking", "Statement": [ { "Sid": "1", "Effect": "Allow", "Principal": { "AWS": "*" }, "Action": "s3:GetObject", "Resource": "arn:aws:s3:::my-brand-new-bucket/*", "Condition": { "StringLike": { "aws:Referer": [ "http://yourwebsitename.com/*", "http://www.yourwebsitename.com/*" "https://google.com/*" "https://bing.com/*" "https://yahoo.com/*" ] } } } ] }
on Apache if your WordPress site is running on Apache, all you need to do is open the .htaccess file (or create it) in the root of the site and add the following: the second line of
allows blank references. You probably want to enable this feature because some visitors use personal firewalls or antivirus programs to delete page references sent by Web browsers. If you do not allow blank referral source URLs, you may inadvertently disable all images for these users. The third line of
RewriteEngine on RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yourdomain.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?google.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?bing.com [NC] RewriteCond %{HTTP_REFERER} !^http(s)?://(www.)?yahoo.com [NC] RewriteRule .(jpg , jpeg , png , gif , svg)$ http://dropbox.com/hotlink-placeholder.jpg [NC,R,L]
defines the allowed references, that is, sites that allow direct links to images, which should be your site (update the yourdomain.com above with your domain). Lines 4, 5, and 6 add search engines to the allow list because you don’t want to block crawlers such as Google bot or Bing bot. This may prevent your pictures from being displayed and indexed in Google image search. The seventh line of
defines the image you want visitors to see instead of the image protected by the hot link. This is not necessary, but you can give them a friendly warning. If you want to allow many sites, you can copy this line and replace the referrer. If you want to generate more complex rules, take a look at this htaccess hotlink protection generator.
if you use the above rules with CDN, you may also need to whitelist your CDN subdomains.
Enable hotlink protection
on NGINX if you are running on NGINX, all you need to do is open your configuration file and add the following:
The WordPress plug-in
location ~ .(gif , png , jpeg , jpg , svg)$ { valid_referers none blocked ~.google. ~.bing. ~.yahoo. yourdomain.com *.yourdomain.com; if ($invalid_referer) { return 403; } }
has some WordPress plug-ins related to hotlinks, but many one-time plug-ins are poorly maintained or poorly reviewed. We do not recommend using them. We recommend that you check out the All In One WP Security And Firewall plug-in, which is an excellent all-round security plug-in with built-in anti-theft features. However, it is usually best to enable hotlink protection at the server or CDN level.
All In One WP Security & Firewall currently has more than 500000 active installations, and you can download it from the WordPress plug-in library or search for it under “install plug-ins” in the WordPress dashboard.
All In One WP Security And Firewall
Disable the right-click menu in WordPress another option to prevent hotlink theft in WordPress is to disable the right-click feature. This is by no means a foolproof approach, but a good way to ensure that typical users do not steal your images or copy them to other applications and link them to your source domain.
has a great free widget called Prevent Content Theft, which can help prevent this situation. You can download it from the WordPress plug-in library, or you can search for installation under the “install plug-in” plug-in in the WordPress dashboard. There is no need to set up, just install it.
WordPress plug-in-Prevent Content Theft
this plug-in not only disables right-clicking on your image, but also disables the entire page to protect your content. We installed and tested it on our development site, and you can see an example of what happens when a user tries to right-click an image below. They will see a notification box to let them know that this feature is disabled.
disables right-clicking
in WordPress
Rename file
if you suddenly find a high-traffic site or multiple sources stealing links to a single image, an easy way you can use is to simply rename the file. Change the links on your own site to make hot linkers furious when their images turn into 404 errors. Although convenient, this method is more like a quick fix and is a bit clumsy to use for large-scale theft.
CPanel set
if you install cPanel or WHM for your domain, you can use the built-in hotlink protection tool. Check the cPanel documentation for more information, which is as simple as enabling settings. Another solution to how
submits a DMCA deletion notification to
is that because they do not own the image and use it without your permission, you can submit a DMCA deletion notification at any time. This can be a quick way to ensure that it is deleted. You will be surprised at what a quick “misuse” letter will do. Many website owners will deal with the problem immediately because they are afraid of legal action.
Summary
if you are a content aggregator and avid sharer, make sure you have a good time and link to the site, do not directly steal the image. If you are really a fan of what you show, you will support the original author more! If you are a content creator, make sure you protect yourself from theft, an area that is not too difficult to prevent. Any of these methods will ensure that you save money, time, and bandwidth.
小结
如果您是内容聚合者和狂热的分享者,请确保玩得好并链接到网站,不要直接盗链图像。如果你真的是你所展示的东西的粉丝,你会更多地支持原作者!如果您是内容创建者,请确保保护自己免遭盗窃,盗链是一个不太难防止的领域。上述任何一种方法都将确保您节省金钱、时间和带宽。