札幌 英会話 スクール AGREATDREAM

10月27日(木)から11月10日(木)までお休みさせていだだきます。
休み期間中はメールでお問合せください。
11月11日(金)から通常通り営業します。

Toxic Hotlinking

You can type this

inurl:yourwebsite.com -site:yourwebsite.com

into to Google to see if people are hotlinking your files.

After that you can just can change file names on your server to stop people hotlinking.

In my case, I would search for this:

inurl:agreatdream.com -site:agreatdream.com

Then from the following pages change URLs or image addresses.

Hope this helps you remove toxic hotlinking from your site.


Add a code snippet to your .htaccess file

Open your .htaccess file, and scroll to the end of it and paste in the following code:

/* Prevent image hotlinking in WordPress */
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourwebsite.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?twitter.com [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?other-websites-go-here.com [NC]
RewriteRule \.(jpg|jpeg|png|gif)$ - [F]

What this code does is prevent other sites other than yours, Facebook, Twitter, and Google from accessing your images. You’ll notice that there’s an additional line with an example of another whitelisted site. If there are other places you want to allow to use your images, go ahead and add them using the same format as the first two entries.

Finally, look at the last line. It indicates which file formats you’ll apply the hotlink prevention rule to. If you’d like, you can add or remove file format options. Remember to replace the URLs in the example above with your own and save the changes to your file.

And that’s it – you just blocked image hotlinking from your website at server level!