1000 FAQs, 500 tutorials and explanatory videos. Here, there are only solutions!
What is hotlinking and how do you prevent it?
This guide allows you to protect yourself against hotlinking.
This hotlinking or direct linking can decrease the performance of your site so to prevent another website from displaying the images you host on our servers, you can add these few lines to the .htaccess at the root of your site:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?infomaniak.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)$ https://infomaniak.com/imagederemplacement.png [NC,R,L]
Replace "infomaniak.com" above by the address of your site.
Remove the 3 lines google/bing/yahoo if you do not want these 3 sites to be allowed to display your images.