# set_primary_domain

Source: https://modulify.ai/docs/mcp/domains/set-primary-domain

Chooses which of a site's connected custom domains is the one address shown wherever only one is shown.

- Title: Make a domain primary
- Scope: `config:write`
- Access: Makes changes

The primary domain is used for links to the live site and for the links and examples in the site's texts. Every other connected domain keeps opening the site. Only a connected domain can be primary, so a domain still waiting for DNS is refused. Without a choice, the first connected domain is primary, and removing the primary domain makes the next connected one primary. It needs the permission to manage domains in the workspace. See [Custom domains](https://modulify.ai/docs/publish/custom-domains).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `projectId` | string | Yes | The site id. |
| `domainId` | string | Yes | The _id of the connected custom domain to make primary, as get_domain_status returned it. |