NavigationContentFooter
Jump toSuggest an edit

How to enable and use the bucket website feature

Reviewed on 22 January 2024Published on 17 March 2021

The Bucket Website feature allows you to host static websites using Scaleway Object Storage.

Security & Identity (IAM)

To perform certain actions described below, you must either be the Owner of the Organization in which the actions will be performed or an IAM user with the necessary permissions.

Requirements
  • You have an account and are logged into the Scaleway console
  • You have configured your API keys
  • You have created an Object Storage 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 «Toogle Icon» 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.

    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 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.
  6. Click Save configuration to confirm. The details of your website configuration display.

    You can now upload the index and error files to your bucket, if you have not already done so, as well as the other files that make up your static website.

    Tip

    Use the drag and drop area to upload several files and folders at the same time.

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

    Note

    You can also configure a CNAME record for your bucket URL to access the website through a domain name of your choice.

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:

<!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:

<!doctype html>
<html>
<head>
<title>Oops!</title>
</head>
<body>
<div id="main">
<h1>Oops! Something went wrong.</h1>
</div>
</body>
</html>
See also
How to monitor your consumptionHow to use Object Storage with Private Networks
Cloud Products & Resources
  • Scaleway Console
  • Compute
  • Storage
  • Network
  • IoT
  • AI
Dedicated Products & Resources
  • Dedibox Console
  • Dedibox Servers
  • Network
  • Web Hosting
Scaleway
  • Scaleway.com
  • Blog
  • Careers
  • Scaleway Learning
Follow us
FacebookTwitterSlackInstagramLinkedin
ContractsLegal NoticePrivacy PolicyCookie PolicyDocumentation license
© 1999-2024 – Scaleway SAS