Prevent image linking

Bruno
  • SEO & GEO
Newcomer Level 1
Posts
3
Like
0
Since
2018
Automatically translated from Spanish
Author #1

Hi there!

Do you know if there's any way to prevent your website's images from being linked to?

I'm asking because of the websites that have been popular lately. I don't think they affect SEO negatively, but they really clutter up the link profile.

An example of the type of site: manner . biz

Thanks!!

Automatically translated from Spanish

4 replies

  1. Traza
    • SEO & GEO
    Newcomer Level 1
    Posts
    1
    Like
    0
    Since
    2018
    Automatically translated from Spanish

    Hello,

    You can do it via htaccess, here's the code, change "yourdomain.com" to your domain, the google line will allow google to index everything, that is, it will give it access, and on the last line you can put whatever image you want for visits that hotlink from other websites, change imagename.png to whatever you want

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://yourdomain.com/imagename.png [NC,R,L]
    
    Automatically translated from Spanish
  2. Bruno
    • SEO & GEO
    Newcomer Level 1
    Posts
    3
    Like
    0
    Since
    2018
    Automatically translated from Spanish
    Author #3

    Trace:

    Hi,

    You can do it via htaccess, here's the code, change "yourdomain.com" to your domain, the google line will allow google to index everything, that is, it will give it access, and on the last line you can put whatever image you want for visits that hotlink from other websites, change imagename.png to whatever you want

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://yourdomain.com/imagename.png [NC,R,L]
    

    Ok, thank you very much.

    In the code it says google.com, does it also work for the .es or should I add another line?

    Best regards

    Automatically translated from Spanish
  3. Julio Rodríguez
    • SEO & GEO
    • CMS & No-code
    • Hosting & Servers
    • Web Development
    • Off-topic
    Regular Level 8
    Posts
    93
    Like
    0
    Since
    2026
    Automatically translated from Spanish

    Bruno:

    Traza:

    Hi,

    You can do it via htaccess, here's the code, change "yourdomain.com" to your domain, the google line will allow google to index everything, that is, it will give it access, and on the last line you can put whatever image you want for visits that hotlink from other websites, change imagename.png to whatever you want

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://yourdomain.com/imagename.png [NC,R,L]
    

    Ok, thanks a lot.

    In the code it says google.com, does it also work for .es or should I add another line?

    Best regards

    as for google.com, I'd leave it as google, since as you say, it's google.es, google.com, google.x and that way you avoid problems

    Automatically translated from Spanish
  4. Bruno
    • SEO & GEO
    Newcomer Level 1
    Posts
    3
    Like
    0
    Since
    2018
    Automatically translated from Spanish
    Author #5

    thisjrodriguez:

    Bruno:

    Traza:

    Hi,

    You can do it via htaccess, I'll leave you the code, change "yourdomain.com" to your domain, the google line will allow google to index everything, that is, it will give it access, and on the last line you can put whatever image you want for visits that hotlink from other websites, change imagename.png to whatever you want

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?yourdomain.com [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?google.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ http://yourdomain.com/imagename.png [NC,R,L]
    

    Ok, thank you very much.

    In the code it says google.com, does it also work for .es or should I add another line?

    Best regards

    as for google.com, I would leave it as google, since as you say, it's google.es, google.com, google.x and that way you avoid problems

    Yes, in the end I left the code as is and added a few more lines for social networks.

    Automatically translated from Spanish

Sign in to take part in the forum.

This reply will be hidden. It is kept and can be restored.

Reason
or with your email