Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions customize/custom-domain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,55 @@

Only retry validation after you confirm that your DNS records are correct. Repeated retries with incorrect records do not speed up validation.

## Manage an existing custom domain

After your custom domain is live, you may need to change hosts, re-verify DNS, serve documentation across multiple domains, or decommission the domain.

### Change or replace a custom domain

To move your documentation to a different custom domain, for example from `www.example.com` to `docs.example.com`:

1. Navigate to the [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) page in your dashboard.
2. Remove the existing custom domain.
3. Add the new domain and follow the [DNS configuration](#configure-your-dns) steps for it.
4. After the new domain is verified and serving traffic, remove the old `CNAME` and verification `TXT` records at your DNS provider.

Check warning on line 132 in customize/custom-domain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L132

In general, use active voice instead of passive voice ('is verified').

If you want zero downtime during the switch, keep the previous domain configured until the new domain shows as verified and TLS provisioning is complete. Then add a redirect at your DNS or hosting provider from the old hostname to the new one.

<Note>
Only one primary custom domain is supported per project. To serve documentation on additional hostnames, see [Serve documentation across multiple domains](#serve-documentation-across-multiple-domains).

Check warning on line 137 in customize/custom-domain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L137

In general, use active voice instead of passive voice ('is supported').

Check warning on line 137 in customize/custom-domain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L137

Did you really mean 'hostnames'?
</Note>

### Re-verify when TXT values change

The dashboard regenerates the `_acme-challenge` and `_cf-custom-hostname` `TXT` values under some conditions, including when you remove and re-add the domain, when you click **Retry validation** after a long delay, or when the underlying certificate order expires.

If verification is failing, always copy the values that are currently displayed in the dashboard rather than reusing values you saved earlier. Stale `TXT` values do not verify.

1. Open the [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) page and copy the `TXT` values that are currently shown.
2. At your DNS provider, replace any earlier `_acme-challenge.<your-domain>` and `_cf-custom-hostname.<your-domain>` records with the current values.
3. Wait for DNS propagation, then click **Retry validation**.

If you have removed and re-added the same domain and validation is still failing, delete both `TXT` records at your DNS provider, wait for propagation, and re-add the values that the dashboard shows after the re-add.

### Serve documentation across multiple domains

A single Mintlify project serves content from one primary custom domain. To make your documentation reachable from more than one hostname, choose one of the following patterns.

- **Redirect additional domains to your primary domain.** Configure a permanent redirect (HTTP 301) at your DNS or hosting provider from each additional hostname to your primary custom domain. This is the recommended pattern when you only need alternate URLs to resolve, and it preserves SEO through your [canonical URL](#set-a-canonical-url).
- **Serve different content per domain with multi-repository deployments.** [Multi-repository deployments](/deploy/multi-repo) let you combine multiple content sources under one project, with a dedicated URL path per source. Multi-repository deployments require an Enterprise plan.
- **Route with an external reverse proxy.** Use a [Cloudflare Worker](/deploy/cloudflare), [Vercel rewrites](/deploy/vercel), or a [custom reverse proxy](/deploy/reverse-proxy) to serve documentation at subpaths of different domains, for example `example.com/docs` and `example.io/docs`. The proxy is responsible for routing each hostname to `mintlify.site`.

### Release a custom domain

To stop serving documentation from a custom domain and revert to your `<subdomain>.mintlify.app` URL:

1. Navigate to the [Custom domain setup](https://app.mintlify.com/settings/deployment/custom-domain) page in your dashboard.
2. Remove the custom domain.
3. At your DNS provider, delete the `CNAME` record and the `_acme-challenge` and `_cf-custom-hostname` `TXT` records for the hostname.

After the domain is removed from your dashboard, Mintlify stops serving traffic for it and does not renew the TLS certificate. If you plan to reuse the same hostname on another platform, wait for DNS to propagate before pointing it elsewhere.

Check warning on line 168 in customize/custom-domain.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L168

In general, use active voice instead of passive voice ('is removed').

## Set a canonical URL

After configuring your DNS, set a canonical URL to ensure search engines index your preferred domain. A canonical URL tells search engines which version of your documentation is the primary one. This improves SEO when your documentation is accessible from multiple URLs and prevents issues with duplicate content.
Expand Down
Loading