Prevent hotlink images redirected through i2.wp.com

For instance, my site name is example.com, some sites are hotlinking my site’s images using links such as - https://i2.wp.com/example.com/wp-content/uploads/image1.jpg

How do I prevent hotlinking when such link is used, I have even added the firewall rule “URI full i2.wpcom” but it is not working.

Any help is grateful.

Thank you

Considering that i2.wp.com host is not part of your domain it won’t be covered by Cloudflare either, hence any settings on Cloudflare won’t apply.

You either need to contact your service provider to find out what referrer protection they offer or shift the content to your own domain, so that Cloudflare rules fire. At that point you can either enable the standard hotlinking protection or create a simple referrer based firewall rule yourself.

Let me clarify my question. The image1 is located at my own server and can be accessed through the link https://example.com/wp-content/uploads/image1.jpg .I have applied the normal hotlinking protection so other sites cannot hotlink the image using the link.

They however, hotlink the image by putting the domain i2.wp.com in front of the image link, like this https://i2.wp.com/example.com/wp-content/uploads/image1.jpg . How do I prevent them from hotlinking the image when they use the 12.wp.com domain name?

Thank you

Precisely what I already described. You either move it all to your own domain or need to clarify with your service provider how to prevent others to link to it. That domain is not on Cloudflare, so none of your settings will apply. I am afraid you need to clarify this with your service provider.

you can’t use that with cloudflare, you need another plugin like https://wp-rocket.me/ or another cdn plugin to add url

The domain https://i2.wp.com seems to be from Photon, so adding the firewall rule “User agent — equals — Photon/1.0” blocks the hotlinking of the images perfectly.

What you just described is not hotlinking however, but they simply scrape your content and store it locally. In that case the referrer won’t help you, you can only block their requests in the first place. If there is a unique user agent you could use that, however that might change at any time.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.