# Create or update hosting configuration Set or update the hosting configuration for a domain or subdomain. This controls how the domain serves content — whether via redirect or reverse proxy. Use the subName field in the request body to target a specific subdomain. If omitted, the configuration applies to the root domain. All hosting configurations require an SSL certificate. After creating or updating a configuration, the certificateStatus will initially be PENDING while the certificate is provisioned. This typically completes within a few minutes. Use $preview=true to validate the request and see the expected result without applying changes. Endpoint: PUT /domains/{name}/dns/hosting Version: 1.0.0 Security: bearer ## Path parameters: - `name` (string, required) Domain name ## Query parameters: - `$preview` (boolean, required) Preview mode — validate the request without executing changes. ## Request fields (application/json): - `subName` (string) The subdomain to configure. Omit or leave empty for the root domain. - `targetUrl` (string) The target URL for redirect or reverse proxy configurations. - `type` (string, required) Enum: "REDIRECT_301", "REDIRECT_302", "REVERSE_PROXY" - `$forceCompatibility` (boolean, required) Force the update even if it may conflict with existing DNS records. ## Response 200 fields (application/json): - `@type` (string, required) Enum: "unstoppabledomains.com/partner.v3.DomainHostingOperationResult" - `operation` (object, required) - `operation.id` (string, required) Operation ID Example: "op-a1b2c3d4-e5f6-7890-abcd-ef1234567890" - `operation.status` (string, required) Enum: "PREVIEW", "QUEUED", "PROCESSING", "FAILED", "COMPLETED", "CANCELLED", "AWAITING_UPDATES" - `operation.type` (string, required) Enum: "ADMIN_GENERIC", "DOMAIN_ADMIN_UPDATE", "DOMAIN_RENEW", "ACCOUNT_UPDATE", "DOMAIN_DNS_RECORD_CREATE", "DOMAIN_DNS_RECORD_UPDATE", "DOMAIN_DNS_RECORD_DELETE", "DOMAIN_DNS_RECORD_BATCH", "DOMAIN_DNS_SECURITY_ENABLE", "DOMAIN_DNS_SECURITY_DELETE", "DOMAIN_DNS_NAME_SERVER_UPDATE", "DOMAIN_HOSTING_UPDATE", "DOMAIN_HOSTING_DISABLE", "DOMAIN_TRANSFER_OUT", "DOMAIN_TRANSFER_OUT_TOGGLE", "DOMAIN_FLAGS_UPDATE", "DOMAIN_CONTACTS_UPDATE", "CONTACT_CREATE", "DOMAIN_SUGGESTION_CREATE", "DOMAIN_SUGGESTION_REFRESH", "DOMAIN_ADMIN_DNS_ZONE_MIGRATE" - `operation.domain` (string) - `operation.createdAtTimestamp` (number, required) - `operation.lastUpdatedTimestamp` (number, required) - `operation.validUntilTimestamp` (number) - `operation.dependencies` (array, required) List of platform operation dependencies that make up this operation ## Response 400 fields (application/json): - `code` (string, required) Machine-readable error code Example: "VALIDATION" - `message` (string) Human-readable error description - `errors` (array) Individual errors when code is MULTIPLE_ERRORS - `errors.code` (string, required) - `errors.message` (string) ## Response 401 fields (application/json): - `code` (string, required) Machine-readable error code Example: "VALIDATION" - `message` (string) Human-readable error description - `errors` (array) Individual errors when code is MULTIPLE_ERRORS - `errors.code` (string, required) - `errors.message` (string) ## Response 403 fields (application/json): - `code` (string, required) Machine-readable error code Example: "VALIDATION" - `message` (string) Human-readable error description - `errors` (array) Individual errors when code is MULTIPLE_ERRORS - `errors.code` (string, required) - `errors.message` (string) ## Response 404 fields (application/json): - `code` (string, required) Machine-readable error code Example: "VALIDATION" - `message` (string) Human-readable error description - `errors` (array) Individual errors when code is MULTIPLE_ERRORS - `errors.code` (string, required) - `errors.message` (string) ## Response 500 fields (application/json): - `code` (string, required) Machine-readable error code Example: "VALIDATION" - `message` (string) Human-readable error description - `errors` (array) Individual errors when code is MULTIPLE_ERRORS - `errors.code` (string, required) - `errors.message` (string)