pedram9372
New member
- Joined
- Oct 6, 2022
- Messages
- 2
Hi there, I want to enable hotlink protection on direct admin and on the other hand, allow google and other search engines to crawl and access my website, and let them hotlink my website. but when I enable hotlink by direct admin, it prevents google from crawling ( I check on google search console "test live"). what should I do to prevent other websites from hotlinking and allow search engines? by the way, I don't know why, but my .htaccess hotlink preventing code doesn't work, so I need a solution for the direct admin method.
( my domain is: https://panamarketing.ir )
here are the URLs that I added to my direct admin (allow list):
===========================================================================
===========================================================================
and here is my .htacees code that does not work at all and doesn't prevent hotlinking:
# Block hotlinking (my images)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?panamarketing.ir/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://([^.]+\.)?google\.
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?twitter.com [NC]
RewriteRule \.(gif|webp|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|js||pdf)$ - [F]
# Block hotlinking (my images)
======================================================================================
( my domain is: https://panamarketing.ir )
here are the URLs that I added to my direct admin (allow list):
===========================================================================
===========================================================================
and here is my .htacees code that does not work at all and doesn't prevent hotlinking:
# Block hotlinking (my images)
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?panamarketing.ir/.*$ [NC]
RewriteCond %{HTTP_REFERER} !^https://([^.]+\.)?google\.
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?facebook.com [NC]
RewriteCond %{HTTP_REFERER} !^https://(www\.)?twitter.com [NC]
RewriteRule \.(gif|webp|jpg|jpeg|bmp|zip|rar|mp3|flv|swf|xml|php|png|css|js||pdf)$ - [F]
# Block hotlinking (my images)
======================================================================================
Last edited: