By esultanzada
Hi, i have a download server, i want to prevent that no other website can use from my download link to their website.
how can i do it?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Ive noticed that the content thieves either are hotlinkers and just steal my images or they re-upload them on their own servers and now its not hotlinking but content theft and I have to hire either a law firm or a dmca takedown service in order to takedown the copyright infringing content.
To prevent other sites from hotlinking your assets you could create a new location block in your Nginx configuration pointing to the directory containing your image file. Then using the valid_referers directive, you can add a list of hosts that are authorized to display the content:
location /assets/ {
valid_referers none blocked example.com *.example.com;
if ($invalid_referer) {
return 403;
}
}
In this example, any domain besides example.com and its subdomains will recieved a 403 forbidden error when attempting to hotlink an image.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.