How to Enable the Spaces CDN

You can enable the Spaces CDN either when creating a new Space or on an existing Space’s Settings tab, in the CDN (Content Delivery Network) section.

Once you’ve enabled the Spaces CDN for a Space, you can access the contents of that Space using the edge URL <spacename>.<region>.cdn.digitaloceanspaces.com instead of the origin URL.

Enable the CDN During Space Creation

To enable the CDN when creating a new Space, on the Spaces create page, look for the CDN (Content Delivery Network) section.

The CDN section of the Spaces create page

Click Enable CDN. An Edge Cache TTL drop-down menu will appear. This setting determines the amount of time that the content is cached. You can keep the default of 1 hour or choose another value.

Finish choosing the rest of the settings for the Space, then click Create a Space. Once the Space is created, you can modify the edge cache TTL setting at any time on the Space’s Settings page.

Enable the CDN for an Existing Space

From the control panel, navigate to the Space’s detail page by clicking the name of the Space. From there, click on the Settings tab. The text in the CDN (Content Delivery Network) section will tell you if the CDN is currently Enabled or Disabled for the Space.

Screenshot of the Settings tab

To enable the CDN, in the same CDN (Content Delivery Network) section, click Edit. In the options that open, click Enable CDN.

The Settings tab for a Space with CDN settings opened

An Edge Cache TTL drop-down menu will appear. This setting determines the amount of time that the content is cached. You can keep the default of 1 hour or choose another value, and then click Save. Once the CDN is enabled, you can return to this page to modify the edge cache TTL setting.

Disable the CDN

From the control panel, navigate to that Space’s detail page by clicking the name of the Space. From there, click on the Settings tab. The text in the CDN (Content Delivery Network) section will tell you if the CDN is currently Enabled or Disabled for the Space.

To disable the CDN for an existing Space from the control panel, navigate to that Space’s detail page by clicking the name of the Space. From there, click on the Settings tab.

In the CDN (Content Delivery Network) section, click Edit. In the options that open, click Disable CDN and then Save. A confirmation window will open:

The "Disable CDN? confirmation window

Click Confirm to disable the CDN, which removes all files and certificates from the edge servers, and all CDN and edge server endpoints.