Summary card: a dotted bucket name fails the certificate check in a virtual-host URL; clients fall back to path style

You name a bucket <code>backups.example.com</code> because it looks tidy. The upload works from your laptop. Then a script that builds the URL itself fails with a certificate error. Nothing is wrong with the bucket. The name has dots in it, and a wildcard certificate cannot cover that.

We tested the same four bucket names on 2026-11-17 with boto3, the AWS CLI, rclone and curl: one plain name, one with dots, one with capitals and one with an underscore. For each client we wrote down the exact URL it builds, then sent real requests and read the TLS result. Short version: the three SDK-style clients quietly switch to path style for the odd names, and curl does exactly what you type, which is where the error shows up.

Two ways to put a bucket in a URL

  • Path style: https://s3.example.com/my-bucket/key.txt. The bucket is the first part of the path. One hostname, one certificate.
  • Virtual-host style: https://my-bucket.s3.example.com/key.txt. The bucket is a DNS label in front of the host. The server needs a wildcard certificate for *.s3.example.com, and every bucket needs to resolve in DNS.

A wildcard certificate covers exactly one label. We read the certificates: <code>s3.amazonaws.com</code> lists <code>.s3.amazonaws.com</code> (valid 2026-09-20 to 2027-04-05) and <code>s3.tport.space</code> serves <code>.tport.space</code> (valid 2026-10-31 to 2027-01-29). So <code>plain-name-2026.s3.amazonaws.com</code> matches, and <code>has.dots.in.it.s3.amazonaws.com</code> has four labels where the wildcard allows one.

What AWS says

  • Bucket names are 3 to 63 characters, lowercase letters, numbers, periods and hyphens, start and end with a letter or number, no two adjacent periods, not shaped like an IP address.
  • "If you include periods in a bucket's name, you can't use virtual-host-style addressing over HTTPS, unless you perform your own certificate validation." AWS recommends avoiding periods except for buckets used only for static website hosting over HTTP.
  • Transfer Acceleration buckets can't have periods at all.
  • Uppercase letters and underscores were allowed in US East (N. Virginia) only before 2018-03-01, so old buckets can still have them.
  • Path style still works in every Region; AWS postponed its deprecation on 2020-09-23. In regions other than US East (N. Virginia), path style needs the regional endpoint or you get a 301.

Result 1: the URL each client builds

We built requests offline with dummy credentials (boto3 presigned URLs, AWS CLI <code>--debug</code>, rclone <code>--dump headers</code>), with the client left on automatic addressing and again with virtual-host forced on. Forcing it changed nothing for odd names.

Client (version)plain-name-2026has.dots.in.itHasCapitalsunder_score
boto3 1.44.4, AWSplain-name-2026.s3.amazonaws.com/path: s3.amazonaws.com/has.dots.in.it/pathpath
AWS CLI 2.25.4plain-name-2026.s3.us-east-1.amazonaws.compath: s3.us-east-1.amazonaws.com/has.dots.in.itpathpath
rclone 1.76.0, provider AWSplain-name-2026.s3.us-east-1.amazonaws.compathpathnot tested
rclone 1.76.0, endpoint s3.amazonaws.com, force_path_style=falseplain-name-2026.s3.amazonaws.compathpathnot tested
boto3 on https://s3.tport.space, automaticpath: s3.tport.space/plain-name-2026/pathpathpath
curl 8.1.2whatever you typewhatever you typewhatever you typewhatever you type
  • boto3 with addressing_style="virtual" and the AWS CLI with addressing_style = virtual still gave path style for the dotted, capitalised and underscore names. The clients decide per name; a config switch cannot force a certificate error.
  • On a custom endpoint boto3 defaults to path style for every name. Forcing virtual on s3.tport.space gave plain-name-2026.s3.tport.space, which does not exist in DNS (curl: could not resolve host), so leave the default.

Result 2: real requests and the TLS result

curl 8.1.2 (Windows, Schannel) with no credentials, so the answers are errors. The point is whether the TLS handshake and hostname check pass; an <code>Error</code> XML answer means they did.

URLResult
https://plain-name-2026.s3.amazonaws.com/404 NoSuchBucket, TLS ok
https://has.dots.in.it.s3.amazonaws.com/curl 60: SEC_E_WRONG_PRINCIPAL, no HTTP answer
https://has.dots.in.it.s3.us-west-2.amazonaws.com/curl 60: SEC_E_WRONG_PRINCIPAL
https://s3.amazonaws.com/has.dots.in.it/404 NoSuchBucket, BucketName has.dots.in.it, TLS ok
https://s3.amazonaws.com/HasCapitals/404 NoSuchBucket, BucketName HasCapitals
https://s3.amazonaws.com/under_score/404 NoSuchBucket, TLS ok
https://HasCapitals.s3.amazonaws.com/404 NoSuchBucket, BucketName hascapitals
https://s3.tport.space/has.dots.in.it/403 AccessDenied (needs a signed request), TLS ok
  • boto3 given the endpoint https://has.dots.in.it.s3.amazonaws.com raised SSLError: hostname 'has.dots.in.it.s3.amazonaws.com' doesn't match either of 's3.amazonaws.com', '*.s3.amazonaws.com', .... The AWS CLI with --endpoint-url printed the same message.
  • The capitals row is the nasty one. DNS names are case-insensitive, so the host is lowercased and the server looked for the bucket hascapitals, not HasCapitals. Nothing failed loudly: the request just went to a different bucket name.
  • The path-style requests to s3.tport.space passed TLS with a dotted name because the bucket is not in the hostname.

Same rule for public file addresses

The same one-label limit applies to any wildcard host. On tport.space, a test address with one label (<code>zz-test.tport.space</code>) completed the handshake. Two labels (<code>has.dots-abc.tport.space</code>) and three (<code>a.b.c-abc.tport.space</code>) failed the handshake with SEC_E_ILLEGAL_MESSAGE. So a name that has to become one DNS label for a public link should have no dots; use a hyphen.

What to do

  • Name new buckets with lowercase letters, digits and hyphens only, 3 to 63 characters. It works in both URL styles on every service.
  • Already have a dotted bucket? Keep using SDKs and CLIs on automatic addressing. They already use path style. Do not hand-build virtual-host URLs for it.
  • Building URLs yourself (a shell script, a link generator)? Use path style: https://endpoint/bucket/key. It never trips the certificate.
  • Check names in CI. The function below rejects anything that is not safe in a hostname:
python
import re

_LABEL = re.compile(r"^[a-z0-9](?:[a-z0-9-]{1,61}[a-z0-9])$")

def host_safe_bucket(name: str) -> bool:
    # 3-63 chars, lowercase letters, digits, hyphens; no dots, no capitals, no underscores
    return bool(_LABEL.match(name)) and not name.startswith("xn--")

For related tests see <a href="https://tport.space/articles/s3-compatible-storage-clients-sdk-endpoint">which clients work with one S3-compatible endpoint</a> and <a href="https://tport.space/articles/unicode-object-keys-s3-nfc-nfd-normalization-listing-order-client-tests">how clients treat odd object keys</a>. Odd keys can be checked with the <a href="https://tport.space/tools/key-checker">S3 key checker</a>.

S3-compatible buckets with no egress fees: one endpoint, path style, for boto3, the AWS CLI, rclone and curl.

Explore tport.space

Test record and sources

  • Run 2026-11-17 on Windows 11. boto3/botocore 1.44.4, AWS CLI 2.25.4, rclone 1.76.0, curl 8.1.2 with Schannel. Dummy credentials and unsigned requests only; no bucket was created or read, and no tport.space account was used.
  • We did not create these bucket names on tport.space: the test covers URL building, certificates and TLS, not what the service accepts as a name.
  • Certificates read with openssl s_client on 2026-11-17. Results are for that date and these client versions.
  • AWS: General purpose bucket naming rules; Virtual hosting of general purpose buckets (wildcard certificate note, path-style update of 2020-09-23, 301 for other Regions).