• I have a blog with lots of images uploaded on it.
    Many people are copying my images links and butting them on their sites.
    I wants to restrict my images to show on my domain only.
    Any idea how should I do it?

    Please tell me, it is very important for me.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Basically, there’s no way you can stop people from “stealing” your images. You might consider using a watermark for them. There are some interresting watermark plugins for that purpose.

    If you want to prevent hotlinking, add this to your .htaccess file (if you use one):

    <IfModule mod_rewrite.c>
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?example.com [NC]
    RewriteRule \.(gif|jpe?g?|png)$ - [NC,F,L]
    </IfModule>

    Obviously replace example.com with your own domain.

    Thread Starter neha_joshi_rocks

    (@neha_joshi_rocks)

    @wpranger

    I tried this code but this is not working.
    An idiot is copying my whole website and hotlinking all my images.
    Whenever someone searching for my site, his site is shown on google.
    I wants to show some other image whenever someone hotlink my images.
    Here is my site.
    https://www.hotmug.org/

    Here is the code on my .htaccess

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?hotmug.org [NC]
    RewriteRule \.(gif|jpe?g?|png)$ - [NC,F,L]
    </IfModule>
    
    # END WordPress

    Am I doing everything right?
    I also wants to add a custom image which should be shown whenever someone hotlink my images.

    Plz help.

    As suggested here
    RewriteRule \.(jpg|jpeg|png|gif)$ https://hpmouse.googlepages.com/hotlink.gif [NC,R,L]
    In between the () are images you intended to block from hotlinking. To add more seperate them with”|”

    Change ‘https://hpmouse.googlepages.com/hotlink.gif‘ to a image you’ve set, and whenever image hotlinking is detected, this image will show up. Just make sure where this image is not hotlink protected or your server can go into an endless loop.

    Thread Starter neha_joshi_rocks

    (@neha_joshi_rocks)

    Here is my code.
    Have I done everything right?
    Coz it’s not working.
    I am using other browser to test image links but no success ??

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?hotmug.org [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ https://www.hotmug.org/wp-content/uploads/2013/10/hotlink.jpe [NC,R,L]
    </IfModule>
    
    # END WordPress

    The image you’re redirecting to ends like this:

    hotlink.jpe

    Is that right?

    Incidentally, I’ve hotlinked one of your images to test, if you check your logs, the alpha domain is me ??

    Thread Starter neha_joshi_rocks

    (@neha_joshi_rocks)

    Yup it’s hotlink with extension .jpe
    Do I have to change the extension of image?

    What I am doing wrong?
    Please tell me.

    PS: I don’t have any idea what is alpha domain ??
    Are you saying that it is working?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to show my uploaded images on my site only?’ is closed to new replies.