At DigitalOcean, we are always working on making the cloud easier to use so that you can focus on building great things.
Part of the journey in creating the developer cloud included launching Spaces, S3-compatible object storage that makes hosting web assets painless. In September 2018, we launched the built-in CDN feature for Spaces that provided the ability to turn on global edge caching for a Space in any of the regions Spaces was available. This allowed our customers to deliver assets to their websites and applications up to 70% faster.
Today, we are pleased to announce custom subdomains for your Spaces CDN endpoints. Now customers can use their own subdomain URL to deliver assets from an S3-compatible Space and secure it with a TLS certificate. These certificates can be issued by a CA authority, self-signed, or auto-generated through DigitalOcean’s Let’s Encrypt integration at no additional cost.
If you don’t have a domain already, you need to purchase one from a domain name registrar. Then you need to set up DNS records for your domain by using a DNS hosting service. Please note that if you plan on using DigitalOcean’s Let’s Encrypt integration to generate TLS certificates for your CDN subdomain, you need to use DigitalOcean’s DNS hosting service. For self-signed certificates, you can use any DNS hosting service. For a detailed walkthrough, see our product documentation on custom subdomains.
Add a DNS CNAME record, such as “assets,” that maps to the CDN endpoint of your Space, then assign your subdomain from the Settings menu for a pre-existing Space or when you enable CDN for a new Space.
There are several reasons that custom subdomains could be useful for you.
Agencies and web developers who use Spaces object storage to host their assets can now use their own subdomain. Not only will this avoid confusion with end users, but it also keeps your tech stack hidden. Nobody but you needs to know where you host your digital assets.
Securing your Space is flexible and easy. You can now upload a certificate for your own subdomain or use a free Let’s Encrypt cert that is simple to provision in just a few clicks, right from the Control Panel. The Let’s Encrypt certificate generation flow follows the same simple design principles used to generate certificates for DigitalOcean Load Balancers.
Spaces users don’t need to spend extra engineering effort implementing a reverse proxy solution to hand off calls between *.cdn.digitaloceanspaces.com and *.myapp.com. In addition, when mapping your own subdomain to the CDN endpoint, it gets automatically added to the CORS listings, saving you a step. Now you can focus on building great applications rather than fine-tuning infrastructure.
Custom subdomains and integrated TLS management are included with your Space at no additional cost.
Web asset hosting is only one use case that can leverage a subdomain connected to a CDN endpoint. Customers have also been asking to host static websites from their Spaces as well. This feature is currently under development and will serve as a building block for a front-end-as-a-service solution that leverages some of the core building blocks of the object storage and CDN infrastructure that customers have come to love.
October 25, 2019•3 min read
October 25, 2019•3 min read
May 7, 2020•3 min read