---
title: "Update maindomain validation method or SSL CA"
method: PATCH
path: "/v1/sites/{id}/maindomain"
tags: ["Domains"]
---

# Update maindomain validation method or SSL CA

`PATCH /v1/sites/{id}/maindomain`

Allows for changing between DNS and HTTP validation for domain ownership, or updating the CA used for SSL for the maindomain

## Path parameters

- `id` integer, required — ID of the Site you are interacting with

## Request body

- PatchMainDomainRequest
  - `domain` string — Domain name to update should you wish to change the maindomain that is not the primary maindomain
  - `validation_method` 'http' | 'txt' — Validation method to use (http = http, txt = DNS)
  - `hide_go_live` 0 | 1 — Hide the Go Live information in the UI now that Go Live is complete
  - `certificate_authority` 'google' | 'lets_encrypt' — Certificate Authority to be used to issue SSL certificates for the site

## Response `200`

OK

- PatchMainDomainResponse
  - `success` boolean — whether the request succeeded
  - `errors` string[]
  - `messages` string[], nullable
  - `result` object
    - `validation_records` ValidationRecord[]
      - `type` 'a' | 'cname' | 'txt' — Type of DNS record
      - `name` string — Name of the DNS record
      - `value` string — Value of the DNS record
      - `status` 'active' | 'active_redeploying' | 'backup_issued' | 'blocked' | 'deactivating' | 'deleted' | 'deletion_timed_out' | 'deployment_timed_out' | 'expired' | 'holding_deployment' | 'inactive' | 'initializing' | 'initializing_timed_out' | 'issuance_timed_out' | 'moved' | 'pending' | 'pending_blocked' | 'pending_cleanup' | 'pending_deletion' | 'pending_deployment' | 'pending_expiration' | 'pending_issuance' | 'pending_migration' | 'pending_provisioned' | 'pending_validation' | 'provisioned' | 'staging_active' | 'staging_deployment' | 'test_active' | 'test_active_apex' | 'test_blocked' | 'test_failed' | 'test_pending' | 'validation_timed_out' — Status of the domain (pending_validation when DNS cannot be validated, active when live)
    - `certificate_authority` 'google' | 'lets_encrypt' | 'ssl_com' | 'digicert' — Certificate Authority that was used to issue SSL certificates for the site
    - `hide_go_live` boolean — Hide the Go Live information in the UI now that Go Live is complete
    - `validation_method` 'http' | 'txt' — Validation method to use (http = http, txt = DNS)

## Other responses

- `400` — Bad Request
- `401` — Authentication failed
- `403` — Not authorized to access endpoint
- `404` — Given site not found for user
- `405` — Invalid input
- `500` — Internal error

---

[API](https://skmtc.net/rocket/apis/rocket-net-api.md) · [All operations](https://skmtc.net/rocket/apis/rocket-net-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rocket/rocket-net-api/versions/db0dcbbc5764/schema)
