When choosing a name for your bucket, you’ll need to be careful to select something that’s DNS-compliant and unique. That’s because your bucket names are used as part of the hostname in the URL when accessing its contents.
Why the bucket names have to be unique
Objects stored in DreamObjects are identified by a URL that looks like this:
Since the bucket name is part of the hostname (in the URL), and hostnames must be unique, the bucket name also must be unique. For example, a bucket named “my-bucket” would have the URL:
This means that there can only be one bucket called “my-bucket” on DreamObjects. Therefore, the easiest way to create a new bucket is to assign a random name and create a domain alias for it using DreamHost Control Panel.
Bucket naming rules
The following are the new rules that will be enforced. Each bucket name:
- Can be 3–63 characters long
- Can only have:
- ASCII lowercase letters
- ASCII numbers
- periods (.)
- hyphens (-)
- Cannot have a period (.) and hyphen (-) next to each other (adjacent)
- Cannot include any Unicode characters, emoji, or non-printable ASCII
- Must NOT be formatted as an IP address (e.g., 192.168.5.4)
How is DreamHost enforcing this?
Many S3-compatible clients have already enforced these stricter rules when creating new buckets. If you use a client that doesn’t enforce all of these rules, DreamObjects will return an error stating the bucket name is invalid.
If your client shows you the HTTP error response, you’ll see a 400 InvalidBucketName response code, including a link to this article.