Updating a Bucket to Support Virtual-hosted Style URLs

Update a bucket to support virtual-hosted style URLs.

By default, bucket scope is set to the tenancy namespace. If buckets meet the following criteria, they can be updated to a region scope which supports virtual-hosted style URLs:

  • The bucket name is unique across all tenants within the region.
  • Bucket names must contain only lowercase letters, numbers, and hyphens.
  • Bucket names can't begin with a hyphen character and can't contain consecutive hyphen characters.
  • Bucket names must be a minimum of 3 characters long and a maximum of 63 characters long.
  • The bucket name acts as a subdomain, so it must also follow standard DNS naming rules.

The bucket scope can't be updated if the bucket name is already in use within the same region, doesn't meet character requirements, or doesn't follow DNS naming rules.

    1. On the Buckets list page, find the Object Storage bucket that you want to work with. For more information about the listing buckets page, see Listing Object Storage Buckets.
      The Buckets list page opens. All buckets in the selected compartment are displayed in a table.
    2. From the Actions menu next to the relevant bucket, select Edit Bucket Scope.
      The Edit Scopes panel opens.
    3. Select REGION.
    4. Select Update.
      Note

      After the bucket scope is set, an update can only be made to change the scope from NAMESPACE to REGION. Bucket scope can't be changed from REGION to NAMESPACE.

  • Use the oci os bucket update command. Include the public-access-type parameter:

    oci os bucket update --name bucket-name  --bucket-scope REGION

    By default, the bucket scope is namespace. You can specify the bucket scope parameter and one of its supported values:

    • NAMESPACE: Allows only path-style access to the bucket.
    • REGION: Allows both path-style and virtual-hosted style URL access to the bucket.
    Note

    After the bucket scope is set, an update can only be made to change the scope from NAMESPACE to REGION. Bucket scope can't be changed from REGION to NAMESPACE.

    For example:

    oci os bucket update --name my-bucket  --bucket-scope REGION 
    {
      "data": {
        "acl-group-id": null,
        "approximate-count": null,
        "approximate-size": null,
        "auto-tiering": "Disabled",
        "bucket-scope": "REGION",
        "compartment-id": "ocid1.compartment.oc1..exampleuniqueID",
        "created-by": "ocid1.user.oc1..exampleuniqueID",
        "defined-tags": {},
        "etag": "20449088-c034-4960-8291-5147c0d6f04f",
        "freeform-tags": {},
        "id": "ocid1.bucket.oc1..exampleuniqueID",
        "is-read-only": false,
        "kms-key-id": null,
        "metadata": {},
        "name": "my-bucket",
        "namespace": "MyNamespace",
        "object-events-enabled": false,
        "object-level-audit-mode": "Disabled",
        "object-lifecycle-policy-etag": null,
        "public-access-type": "NoPublicAccess",
        "replication-enabled": false,
        "storage-tier": "Standard",
        "time-created": "2026-03-17T18:26:52.359000+00:00",
        "versioning": "Disabled"
      },
      "etag": "20449088-c034-4960-8291-5147c0d6f04f"
    }

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • This task can't be performed using the API.