Restrict Specific File Types From Being Uploaded in SharePoint

Restrict Specific File Types to upload in SharePoint

Recently I received a requirement to restrict the upload of a specific file to in SharePoint. Since our requirement was to prevent the upload of one or more file types in the site we first decided to write an Event receiver. But after a little study, I found it can be done OOB from the Central Admin Page.

I will demonstrate this step-by-step.

Step 1: Open SharePoint Central Administration.

Step 2: In the Central Administration Page Click Security.


Step 3: On the Security Page Select Define blocked files type.


Step 4: Select the web application you need to apply the file upload restriction for.


Step 5: Scroll down to the section “Type each file extension on a separate line”.

Step 6: Add the file type you need to restrict (say htm and html).


Step 7: Finally click OK.

Step 8: Now move to the site for which you have restricted the file and try to upload a file with the same extension (Say .html).


You will find that you are unable to upload the specific file type and an error message will prompt as above.

Conclusion: Each web application maintains a list of blocked file types that is based on file name extensions and we can restrict certain file types to uploaded or downloaded on a specific site.