Custom Domains

A CustomDomain object represents an additional customer-owned domain that routes to a Files.com site.

List Custom Domains

Command

files-cli custom-domains list

Output

Outputs a list of CustomDomain objects according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Additional Arguments

Example Request

files-cli custom-domains list

Show Custom Domain

Command

files-cli custom-domains find

Output

Outputs a CustomDomain object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator or a Workspace Administrator for the relevant workspace.

Flags

FlagDescription
--id=
int64
Required
Custom Domain ID.

Example Request

files-cli custom-domains find \
  --id=1

Allocate dedicated IP addresses to this Custom Domain

Command

files-cli custom-domains create-allocate-ip

Output

Outputs a CustomDomain object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Custom Domain ID.
--count=
int64
Required
Number of dedicated IP addresses to allocate.
Possible values: 1, 2

Example Request

files-cli custom-domains create-allocate-ip \
  --id=1 \
  --count=1

Create Custom Domain

Command

files-cli custom-domains create

Output

Outputs a CustomDomain object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDefaultDescription
--available-to-all-workspaces
boolean
falseAllow all workspaces to use this default-workspace Custom Domain.
--workspace-id=
int64
0Workspace ID (0 for the default workspace).
--destination=
string
"site_alias"Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.
Possible values: site_alias, public_hosting, s3_endpoint, unassigned
--folder-behavior-id=
int64
Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned.
--ssl-certificate-id=
int64
Current SSL certificate ID.
--domain=
string
Required
Customer-owned domain name.

Example Request

files-cli custom-domains create \
  --domain="files.example.com"

Update Custom Domain

Command

files-cli custom-domains update

Output

Outputs a CustomDomain object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Custom Domain ID.
--available-to-all-workspaces
boolean
Allow all workspaces to use this default-workspace Custom Domain.
--workspace-id=
int64
Workspace ID (0 for the default workspace).
--destination=
string
Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.
Possible values: site_alias, public_hosting, s3_endpoint, unassigned
--folder-behavior-id=
int64
Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned.
--ssl-certificate-id=
int64
Current SSL certificate ID.
--domain=
string
Customer-owned domain name.

Example Request

files-cli custom-domains update \
  --id=1

Delete Custom Domain

Command

files-cli custom-domains delete

Output

No output is returned.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Custom Domain ID.

Example Request

files-cli custom-domains delete \
  --id=1

The CustomDomain Object

Some of the commands above return a CustomDomain object. The attributes of this object are listed below.

AttributeDescription
id
int64
Custom Domain ID.
workspace_id
int64
Workspace ID (0 for the default workspace).
available_to_all_workspaces
boolean
Allow all workspaces to use this default-workspace Custom Domain.
outbound_ip_addresses
array(string)
Eligible public IP addresses for Remote Server outbound connections. Empty when this Custom Domain is not eligible for outbound selection.
domain
string
Customer-owned domain name.
destination
string
Where this custom domain routes. Can be site_alias, public_hosting, s3_endpoint, or unassigned (not routing traffic). Set to unassigned automatically when a bound public_hosting folder behavior is deleted, and can be set manually via the API for any reason.
Possible values: site_alias, public_hosting, s3_endpoint, unassigned
dns_status
string
Current DNS verification status.
Possible values: disabled, correct, no_records, cname_wrong, a_record, caa_conflict
ssl_certificate_id
int64
Current SSL certificate ID.
brick_managed
boolean
Is this domain's SSL certificate automatically managed and renewed by Files.com?
folder_behavior_id
int64
Public Hosting behavior ID when this domain routes to a specific Public Hosting behavior. Preserved as historical context when destination becomes unassigned.
ip_addresses
array(string)
Dedicated public IP addresses allocated to this Custom Domain.
created_at
date-time
When this Custom Domain was created.
updated_at
date-time
When this Custom Domain was last updated.