How to host a static website on UpCloud Object Storage

Last updated on: October 28, 2026

Managed Object Storage can serve the files in a bucket as a website, so a static website or a single-page application (SPA) doesn't need a web server of its own. The website is served over HTTPS, on a domain that the service provides or on your own domain.

This guide walks you through uploading a website's files, creating the website in the Control Panel or with the API, and checking that it works. It also covers error pages, using your own domain, and changing or deleting the website.

Before you start

You need:

Static websites are reached over the service's public access, which is on by default.

Upload the website's files

Upload the folder to the bucket with aws s3 sync:

aws s3 sync ./my-website s3://example-website --profile upcloud
Output
upload: my-website/about.html to s3://example-website/about.html
upload: my-website/404.html to s3://example-website/404.html
upload: my-website/index.html to s3://example-website/index.html
upload: my-website/blog/index.html to s3://example-website/blog/index.html
upload: my-website/images/logo.png to s3://example-website/images/logo.png
upload: my-website/css/style.css to s3://example-website/css/style.css

The paths of the files in the bucket become the paths of the website's pages, so my-website/blog/index.html is served at /blog/. To keep the website in a folder of the bucket instead of at its root, upload to the folder, for example s3://example-website/public/, and set it as the bucket prefix when you create the website.

Files are served without a Cache-Control header unless they have one. To tell browsers how long they can cache the files, add --cache-control with a time in seconds to the upload command, for example --cache-control "max-age=3600". aws s3 sync uploads only new and changed files, so it doesn't change the header of files that are already in the bucket. To set the header on those, upload them all again with aws s3 cp:

aws s3 cp ./my-website s3://example-website --recursive --cache-control "max-age=3600" --profile upcloud

For a few files, you can also use the file manager in the Control Panel. Open the bucket on the service's Buckets tab, then click Upload files. The file manager uploads files but not folders, so create folders with Create directory.

Create the static website

Visitors open the website without credentials, so the files in the bucket must be publicly readable. In the Control Panel, you can make the bucket publicly readable while you create the website.

A website uses one of two routing modes:

  • File-based routing serves the file that matches each path, and a path without an extension finds the matching .html file, so /about serves about.html. Choose it for websites with a file for each page, such as those built with Hugo, Jekyll or Astro.
  • SPA mode serves files that have an extension, such as app.js, and serves the index document for every other path. Choose it for single-page applications built with frameworks such as React, Vue or Angular, whose own router handles the paths.
  1. Go to Object Storage, open the service and go to its Static websites tab.

  2. Click Configure static website.

  3. Under Domain, select the service's static website domain, which ends in -static.upcloudobjects.com. To use your own domain instead, see Use your own domain.

  4. Under Bucket name, select the bucket.

  5. Click Configure access, turn on Enable bucket public access, and click Close. This makes every file in the bucket publicly readable, and it replaces any bucket policy that the bucket already has.

  6. If the files are in a folder of the bucket, enter the folder under Bucket prefix, for example public/. Index document is the file that's served for the website's root and for paths that end in /. It's index.html by default.

  7. Under Routing mode, select File-based routing or SPA mode (Single Page Application).

  8. Click Create.

    The static website form with the domain and bucket selected

You can also start from the Buckets tab: Create static website on the bucket's row opens the same form with the bucket selected.

The website appears on the Static websites tab. While it's being set up, the service's status shows a setup step. The website is ready once the service's status is Running again.

Open the website

The website is at its domain, for example https://abcd1-static.upcloudobjects.com/. In the Control Panel, you can open it with View website on the Static websites tab. Check that the home page loads with its styles and images, and that links between pages work.

You can also check a page with curl:

curl -I https://abcd1-static.upcloudobjects.com/
Output
HTTP/2 200
date: Wed, 28 Oct 2026 14:59:27 GMT
server: ViPR/1.0
...
content-type: text/html
content-length: 176

Add error pages

When a visitor opens a page that doesn't exist, the website shows a standard error page. To show your own page instead, upload it to the bucket and add it as an error page.

  1. On the service's Static websites tab, click Edit on the website's row.
  2. Under Error pages, click Add error page.
  3. Under Match type, select the error, for example 404 - Not Found. You can also select a range, such as 4xx - All client errors (400-499).
  4. Under Error document, enter the page's path in the bucket, without a leading /, for example 404.html. Then click Save.
  5. Click Save at the bottom of the form.

Use your own domain

To serve the website on your own domain, such as www.example.com, add the domain to the service as a custom domain with the Static website purpose, then create a website on it. Each domain has one website, and a website's domain can't be changed later. If you already have a website on the service's domain, create a second one for the same bucket on your own domain. You can then delete the first one, or keep both.

The custom domain needs three CNAME records at your DNS provider, as described in Managed Object Storage custom domains and static websites. If your DNS provider is Cloudflare, set all three records to DNS only, because UpCloud can't get the certificate through proxied records. If your domain has CAA records, they must allow sectigo.com, as described in CAA records for automatically issued certificates.

  1. On the service's Static websites tab, click Configure static website.

  2. Next to Domain, click Add domain.

  3. Enter your domain under Domain. Static website is already selected under Purpose. Click Next.

  4. The window lists the DNS records. Add them at your DNS provider with the names and values shown.

    The Add custom domain window with the DNS records for a static website domain
  5. Click Verify DNS. Once the window says DNS records verified successfully., click Create.

  6. The new domain is now selected under Domain. Fill in the rest of the form as in Create the static website, and click Create.

The domain is listed with the status Pending on the Custom domains tab while UpCloud gets its certificate. The website works on your domain once the domain's status is Active and the service's status is Running again.

Apex domains

You can also use an apex domain, such as example.com. A CNAME record isn't allowed at the apex of a domain, so the Control Panel lists an ALIAS record for it instead. Use an ALIAS record if your DNS provider has them, or a CNAME record if your provider flattens CNAME records at the apex, as Cloudflare does. If your provider supports neither, use a subdomain such as www.example.com.

The wildcard record also sends names under the apex domain to the website, so www.example.com shows the same website as example.com.

Change or turn off the website

On the service's Static websites tab, click Edit on the website's row. You can change everything except the domain. To turn the website off without deleting it, turn off Static website enabled. Then click Save.

While the website is off, its domain answers with 503 Service Unavailable.

Delete the website

Deleting a website doesn't delete the files in the bucket.

  1. On the service's Static websites tab, click Delete on the website's row.
  2. Click Delete configuration.

If the website was on your own domain, the custom domain stays on the service, and the domain answers with 503 Service Unavailable until you add a new website on it or remove the domain. To remove it, see How to configure a custom domain for Managed Object Storage.

Troubleshooting

  • The website shows 400 Request error instead of a page.

    The files in the bucket aren't publicly readable. Make the bucket publicly readable as described in Create the static website, or as in How to set up a public read bucket.

  • A page that you link to without a trailing slash, such as /blog, shows 404 - Page not found.

    The index document is served only for paths that end in /. Link to the folder as /blog/.

  • Your own domain gives a certificate error, for example curl: (60) SSL: no alternative certificate subject name matches target hostname 'www.example.com'.

    The domain doesn't have its certificate yet. Wait until its status on the Custom domains tab is Active. If it stays Pending, check its DNS records as described in How to configure a custom domain for Managed Object Storage.

Next steps

Contributed by: Samir Haliru

Can't find what you're looking for?

For more help you can contact our awesome 24/7 support team

Contact Support