Skip to main content

How to set site closure and deletion policies in SharePoint Online

We have all been there – you go and do an inventory of your SharePoint environment, and you make it to the subsites that have last been touched by the humans five years ago. Moreover, the site owner has left the company, and no one knows what the site is for and what kind of content is there. To avoid such trivial situations, it is wise to have a company-wide governance plan. One element of the governance plan could be the site retention policy. The good news is that it can be automated within SharePoint with the help of site closure and deletion policies. This post explains how to do this.

By default, sites are never automatically deleted and are retained forever, unless a custom site policy has been created.

Step 1: Create a custom site policy

  1. Gear Icon > Site Policies (under Site Collection Administration)
  2. Hit Create
  3. By default, Do not close or delete site automatically is selected. To create a custom policy, choose one of the other radio buttons. In the example below, I created a policy that automatically deletes sites that have been manually closed by the user 12 months after site closed date. You can also close and delete sites automatically.
  4. Once you create conditions/triggers for a policy, click OK

Step 2: Apply a custom site policy to a site

  1. Once you have created a site policy at the site collection level, you now need to apply it manually to each subsite. To do this, go the subsite you want to apply the policy to, then Gear Icon > Site Settings > Site Closure and Deletion (under Site Administration)
  2. Under Site Policy, choose the policy you just created from the drop-down menu. Click OK
  3. Due to the specific policy we created, we are waiting for site owner to close the site first. To do this, go to the Site Closure and Deletion and press Close this site now button. Two things will occur in our case. #1 – the site and its contents will “disappear” from SharePoint, and #2 – specific to our policy, a 12-month deletion policy will be triggered and the clock will start ticking from the site closure date
  4. You can always fo back and open the site again or even postpone the site deletion if you wish – as shown below.

Step 3: Warnings and Notifications

Once the site is close to deletion date by means of the policy you set up above, you will constantly be reminded about that fact. First, if you log in to the site, you will see a notification message appearing on the top.

Second, Site Collection Admin will get an email like the one below with the warning.




You may also like

How to set up retention and deletion policies for files and folders in SharePoint

June 1st, 2017

Need SharePoint Help?

Hourly consulting, training and configuration services are available

Learn More