Toxic Hotlinking | How to Prevent Image Hotlinking
You can type this: inurl:yourwebsite.com -site:yourwebsite.com into to Google Image Search 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.
Whitelisting sites to link to your content
Add a code snippet to your .htaccess file
Go to the main file directory of your website and open your .htaccess
file.
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!
What Inbound Links Trigger Google Penalties?
Below, we list cases where you can get bad link penalties so you can avoid them in the future.
We found the following penalty cases:
- Sponsored/paid links in posts, articles and blogs.
- Guest posting or press releases.
- Link networks.
- User spam.
- Web directories and listings of links.
- Spam.
- Direct ads with affiliate links.
- Business directories.
- Bookmarking sites.
- Widget links.
- Hidden links.
- Sitewide links.
Tips to Avoid Penalties
- Do not promote products or services directly without using nofollow or sponsored attributes, such as rel=”sponsored”.
- Request “rel=sponsored” attributes when placing links to other sites.
- Avoid excessive keyword-rich anchors in the text (diversify keywords used so you don’t have hundreds of the same anchor text/backlink).
Tips to Get Penalties Removed
- Set/request rel=”nofollow” or rel=”sponsored” attributes.
- Disavow links if you have contacted a website but they have not added the nofollow or sponsored attribute.