Skip to main content

Custom domain

You can also use a custom domain with your bucket. To do this, the following requirements must be met first:

  1. The custom domain name must match the bucket name. For example, if the custom domain is, the bucket name must be
  2. The custom domain must be a CNAME record that points to the bucket URL. For example, if you own the domain, you can create a CNAME record for that points to

Once these requirements are met, you can enable the custom domain as follows:

flyctl storage update --custom-domain

To remove the custom domain, you can use the following command:

flyctl storage update --clear-custom-domain


When providing objects that render in a browser and have access to your domain's cookies, ensure that objects are sanitized to prevent XSS vulnerabilities.