UseVirtualHosting Property

Determines which URL style to use when making requests.


public boolean isUseVirtualHosting();
public void setUseVirtualHosting(boolean useVirtualHosting);

Default Value



If true (default), virtual-hosted-style URLs will be used to make requests: Note that hosted-style URLs impose more bucket name restrictions due to DNS server naming restrictions. Refer to Amazon's documentation for more information.

If false, path-style URLs will be used to make requests:

Important: When using the spAmazonS3 (0) service provider, keep in mind that Amazon has publicly announced that buckets created after September 30, 2020 will only support virtual-hosted-style URLs. Buckets created on or before September 30, 2020 will continue to support both URL styles.

Note: This property is ignored when ServiceProvider is set to one of the following:

  • spAlibaba (6); Alibaba does not support path-style URLs, only virtual-hosted-style URLs.
  • spOracle (8); Oracle Cloud Object Storage does not support virtual-hosted-style URLs, only path-style URLs.

This property is not available at design time.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks S3 2020 Java Edition - Version 20.0 [Build 8164]