Protect files with domain restriction
Your Sirv files can be requested by anyone who knows the URL.
Sirv offers multiple ways to limit file access, if you wish to protect some or all of your files. Domain restriction is one of those protections.
How domain restriction works
Domain protection will block access to your files, unless the request comes from a whitelisted (approved) domain. This can prevent leeching of your bandwidth - when your images are served to web pages that don't belong to you. You can also block direct requests and search engine bots.
When a request is blocked, a 403 response will be returned. For example, this file belongs to an account using domain protection:
https://demo-protected.sirv.com/important-image.jpg
Enable domain restriction
1. Go to the Domains section of your Sirv account. If you don't have a Sirv account, create a free account now.
2. In the Domain Restriction section, switch the toggle from "Off" to "On":
3. Click the + icon to add a domain you wish to allow:
4. Enter the domain name to be whitelisted:
5. Add as many domains as you wish:
Prevent direct requests and search engines
You can deactivate "direct" requests too - when an image URL is requested directly by a browser or program.
Search engines can also be blocked from indexing your images. This will stop them from appearing in Google Images search results (and other search engines).
More image protections
Sirv also provides other ways to protect your files:
- Strict profile - apply watermarks and other settings to all images in a folder and its subfolders.
- HTTP authentication - protect all the contents of a folder with a username and password.
- Token authentication - block requests for your files unless they contain a valid token in the URL.