Skip to content
Merged
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
52 changes: 38 additions & 14 deletions customize/custom-domain.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,53 +4,77 @@
og:description: "Host your documentation at your website's custom domain"
---

To set up your documentation on a custom domain, you'll need to set your desired custom domain in your Mintlify settings and configure your DNS settings on your domain provider.
To host your documentation on a custom domain, set your desired custom domain in your Mintlify settings and configure your DNS settings on your domain provider.

<Info>
Looking to set up a custom subdirectory like `mintlify.com/docs`? See the [custom subdirectory](/deploy/cloudflare) docs.
</Info>

## Dashboard settings

1. Navigate to your [dashboard](https://dashboard.mintlify.com)
2. Select **Settings**
3. Select **Domain Setup**
4. Enter your desired custom domain. For example, `docs.mintlify.com`
1. Navigate to your [dashboard](https://dashboard.mintlify.com).
2. Select **Settings**.
3. Select **Domain Setup**.
4. Enter your desired custom domain. For example, `docs.mintlify.com`.

<Frame>
<img
alt="Custom Domain"
alt="The Custom Domain setup page with the Enter your domain URL field highlighted."
className="block dark:hidden"
src="/images/add-custom-domain-light.png"
/>
<img
alt="Custom Domain"
alt="The Custom Domain setup page with the Enter your domain URL field highlighted."
className="hidden dark:block"
src="/images/add-custom-domain-dark.png"
/>
</Frame>

## Configuring your DNS
## Configure your DNS

1. Proceed to your domain's DNS settings on your domain provider's website.
2. Create a new DNS entry, inputting the following values:
1. Navigate to your domain's DNS settings on your domain provider's website.
2. Create a new DNS entry with the following values:

```bash
CNAME | docs | cname.vercel-dns.com.
```

<Frame>
<img alt="DNS" src="https://mintlify-assets.b-cdn.net/mintlify-dns.png" />
<img alt="Sample CNAME settings for a custom domain hosted on Vercel." src="https://mintlify-assets.b-cdn.net/mintlify-dns.png" />
</Frame>

## Provider-specific settings

<AccordionGroup>
<Accordion title="Vercel verification">
If Vercel is your domain provider, you must add a verification `TXT` record. This information will show on your dashboard after submitting your custom domain, as well as be emailed to you.
If Vercel is your domain provider, you must add a verification `TXT` record. This information appears on your dashboard after submitting your custom domain, and is emailed to you.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L50

In general, use active voice instead of passive voice ('is emailed').
</Accordion>

<Accordion title="Cloudflare security settings">
If Cloudflare is your DNS provider, you must enable the "full strict" security option for the https setting.
If Cloudflare is your DNS provider, you must enable the "full strict" security option for the HTTPS setting.
</Accordion>
</AccordionGroup>
</AccordionGroup>

## Set a canonical URL

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L58

'Set a canonical URL' should use sentence-style capitalization.

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.

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

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

customize/custom-domain.mdx#L60

Spell out 'SEO', if it's unfamiliar to the audience.

Add the `canonical` meta tag to your `docs.json`:

```json
"seo": {
"metatags": {
"canonical": "https://www.your-custom-domain-here.com"
}
}
```

Replace `https://www.your-custom-domain-here.com` with your actual custom domain. For example, if your custom domain is `docs.mintlify.com`, you would use:

```json
"seo": {
"metatags": {
"canonical": "https://docs.mintlify.com"
}
}
```