How to use custom domain for object storage

I'm looking to use object storage, but I'm wondering if there is a way to make it use my domain name.

I tried using a CNAME record, but I keep getting 'missing bucket' errors.

Any ideas?

Thank you so much

2 Replies

Yes, you can use a custom domain with Linode Object Storage with some limitations. I have provided an overview. Details can be found here:

I will use www.example.com to illustrate. Let's pretend the bucket is in Newark (us-east-1).

  1. Create a bucket must be labeled as your FQDN: Name your bucket www.example.com

    • If your files already exist in a bucket that doesn’t have this label, create a new bucket with this label and copy your files into it.
  2. Create a CNAME record for the site like this example.
      The "website-" in front of the cluster-id is significant:

        www    IN CNAME    www.example.com.website-us-east-1.linodeobjects.com

  3. Initialize your bucket as a web site:
    s3cmd ws-create --ws-index=index.html --ws-error=404.html s3://www.example.com

  4. Go to the Access tab for your bucket and set the ACL to Public Read.

  5. Create a simple index.html file in the bucket's main directory:

<html>
<head>
<title>Testing 1.2.3.</title>
</head>
<body>
<h1>Hello, World!</h1>
</body>
</html>

6. Verify that you can browse: http://www.example.com/index.html
If there are any problems, check the permissions to ensure that index.html has the Public Read ACL and that your DNS records are resolving.

7. Get a TLS/SSL certificate for www.example.com. If you are using certbot according to the guide provided above, it will ask you to put a file in .well-known/acme-challenge/. Make sure that the file and all the directories containing it are publicly readable. Verify that you can access the file from your browser, before telling certbot to check it, otherwise you will have to create another file with a different name and contents.

8. Install the certificate for the bucket in the Cloud Manager in the bucket's SSL/TLS tab.

9. You should be able to browse the site using HTTPS now.

Am I understanding correctly that "www" is required for domain name to work? i.e. to reach my website with the CNAME record set up, I need to type my website's address with "www".
Thanks.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct