User have access to SharePoint document library. User can download document from SharePoint library by go to that document library and download specific documents. User should not download files/document by entering direct url.

Can I prevent download or view "documents/files" by direct access url?

Is there any settings for this?

1 Answer 1


AFAIK, It is not possible to do what you want to do, for fundamental reasons. The user controls the client. From the server side, the server has no way to distinguish a legitimate browser that happens to be making a request for an file in the library(a case where you want to serve the file) from a malicious user who is trying to directly access the file(a case where you don't want to serve the file). These two situations are indistinguishable from the server's point of view, so the server has to behave the same way in both cases: either serve the file in both cases, or don't serve it.

You can only decide whether a user has access to download a file from your site or not, you cannot control what a determined user does with the file.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.