Protect files with password

On this page

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:

https://demo.sirv.com/Example-Folder/lv-M46197_PM2_Front.jpg

When you provide the following username/password, the file will load:

User: Example
Pass: StrongPassword%50

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.

Alternative protections

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 help from a Sirv expert

To discuss which method(s) of protection would be best for your requirements, please ask the Sirv support team.

Was this article helpful?

Get help from a Sirv expert

help ukraine help ukraine Powered by Ukrainian determination and British ingenuity

How can you support Ukraine