---
title: How to enable and use the bucket website feature
description: Host a website using Scaleway Object Storage buckets.
tags: bucket website object-storage object storage
dates:
  validation: 2025-09-02
  posted: 2021-03-17
---
import Requirements from '@macros/iam/requirements.mdx'

The Bucket Website feature allows you to host [static websites](https://en.wikipedia.org/wiki/Static_web_page) using Scaleway [Object Storage](https://www.scaleway.com/en/object-storage/).

<Requirements />

- A Scaleway account logged into the [console](https://console.scaleway.com)
- [Owner](/iam/concepts/#owner) status or [IAM permissions](/iam/concepts/#permission) allowing you to perform actions in the intended Organization
- A valid [API key](/iam/how-to/create-api-keys/)
- An [Object Storage bucket](/object-storage/how-to/create-a-bucket/)

## How to enable the bucket website feature

1. Click **Object Storage** in the **Storage** section of the side menu. The list of your buckets displays.

2. Click the name of the bucket you wish to host your website on.

3. Click **Enable bucket website** in the **bucket settings** tab. A pop-up appears.

4. Click the <Icon name="toggle" /> icon to enable the feature.

5. Enter the names of the **index** and **error** files of your website.

    The **index** and **error** files are commonly named `index.html` and `error.html`, respectively. You may have already uploaded these files to your bucket, or you can upload them later. Either way, their names and paths must be specified at this step.

    <Message type="important">
      - The index and error files must be located at the root of your bucket, rather than in a folder.
      - When Bucket Website is enabled, a default [bucket policy](/object-storage/concepts/#bucket-policy) is applied. All objects in the bucket then become publicly visible. You can create your own bucket policy to change the visibility settings [via CLI](/object-storage/api-cli/bucket-policy/).
    </Message>
6. Click **Save configuration** to confirm. The details of your website configuration display.

    You can now [upload the **index** and **error** files](/object-storage/how-to/upload-files-into-a-bucket/) to your bucket, if you have not already done so, as well as the other files that make up your static website.

    <Message type="tip">
      Use the drag and drop area to upload several files and folders at the same time.
    </Message >

7. Access the website by clicking the **Website URL** from the **Bucket settings** tab.

    <Message type="note">
      You can also [configure a CNAME record](/tutorials/s3-customize-url-cname/) for your bucket URL to access the website through a domain name of your choice.
    </Message>

## Sample HTML files

Use the samples below to quickly create HTML files for testing purposes.

Here is an example of a basic `index.html` file:

```html
<!doctype html>
<html>
  <head>
    <title>My Website</title>
  </head>
  <body>
    <div id="main">
        <h1>Hi! Welcome to my website.</h1>
    </div>
  </body>
</html>
```

Here is an example of a basic `error.html` file:

```html
<!doctype html>
<html>
  <head>
    <title>Oops!</title>
  </head>
  <body>
    <div id="main">
        <h1>Oops! Something went wrong.</h1>
    </div>
  </body>
</html>
```
