Nginx Hotlink Protection

To block hotlink protection or bandwidth stealing, you can add the following to the server configuration of your website.

If you need to allow hotlink from a specific domain, you can edit the valid_referers line and add the url. For allowing access with out any referral, you can use “none” instead of the domain name. For example

If you only want to limit access to images and videos, you can put the above code in a location block like


See Nginx

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *