Protect files with password
You can protect the contents of a folder with HTTP authentication. To visit the URL of a file in the folder, a username and password will be required.
Example of a protected file
The /Example-Folder/ folder of the demo.sirv.com account has been protected. Try to visit this image URL:
When you provide the following username/password, the file will load:
How to protect a folder
To protect the contents of a folder with a password, ask the Sirv support team to enable HTTP authentication on that folder.
Once enabled, the files in that folder and its subfolders will no longer be publicly accessible. The only way for a file to be viewed is by providing the valid username and password.
Only one username/password can be set per folder.
Sirv also provides other ways to protect files from being viewed:
- Domain protection - you can enable domain restriction to block direct requests and specify which domains may display your images (whitelisting).
- JWT protection - you can enable JWT signed URLs so that only URLs containing a valid token can be served.
- Watermarks - you can apply image or text watermarks to your images. They can be made irremovable with JWT protection.
Get gelp from a Sirv expert
To discuss which method(s) of protection would be best for your requirements, please ask the Sirv support team.