S3 Object Storage - Customizing URLs with CNAME
If you are using Scaleway Object Storage, you might not want the
scw.cloud domain name to appear in your bucket’s URL. This may be the case if, for example, you are providing files to download or hosting the images of your website from a bucket. You may prefer a domain name such as
download.mywebsite.com to display on your links, instead of
In this tutorial, we show you how to use CNAME to map a domain or subdomain to an Object Storage bucket and access the files stored in the bucket via your own domain name.
- From the Scaleway console, create a new bucket. When entering a name for your bucket, the name must be exactly the same as the domain/subdomain intended to be used with it. For example, to create a bucket accessible at
download.example.comthe bucket name must be
- Set the bucket ACL with AWS-CLI:
aws s3api put-bucket-acl --bucket download.example.com --acl public-read
- Log into the administration panel of your domain and create a new record that defines the hostname as an alias for the bucket. For example, if the bucket
download.example.comis located in the Paris region, the CNAME should point to
You can now access the file
myapp.tar.gz stored in the bucket
download.example.com directly at
http://download.example.com/myapp.tar.gz instead of the usual URL
SSL is not available when connecting to a bucket in this way.