# 设置自定义域名

默认情况下，您的站点将发布在我们平台的一个子域名下。您可以将其替换为您自己的域名（例如 `docs.yourcompany.com`）适用于任何付费方案。

### 前提条件

* 付费方案（Pro 或更高）
* 可访问您域名的 DNS 设置
* 已发布的站点

### 步骤

{% stepper %}
{% step %}

### 在设置中添加您的域名

转到 **设置 → 发布 → 自定义域名** ，并输入您要使用的域名或子域名（例如 `docs.yourcompany.com`）。点击 **保存**.
{% endstep %}

{% step %}

### 创建 CNAME 记录

在您的 DNS 提供商处，创建一条 CNAME 记录，将您的子域名指向您在设置中显示的地址。变更传播最多可能需要 48 小时，不过通常会快得多。

```
类型：  CNAME
名称：  docs
值：sites.example-platform.com
```

{% endstep %}

{% step %}

### 验证并激活

返回到 **设置 → 发布 → 自定义域名** 并点击 **验证**。验证完成后，SSL 将自动签发——这通常需要几分钟。
{% endstep %}
{% endstepper %}

{% hint style="info" %}
使用根域名（例如 `yourcompany.com` ，而不是子域名）？您需要设置 ALIAS 或 ANAME 记录，而不是 CNAME。并非所有 DNS 提供商都支持此功能——请查阅您的提供商文档。
{% endhint %}

### 故障排除

**验证始终失败** 请确保同一子域名不存在冲突的 DNS 记录。现有的 A 记录会阻止 CNAME 生效。

**SSL 证书未签发** 在 DNS 验证后，SSL 会自动签发。如果 30 分钟后仍未出现，请尝试再次点击 **验证** 。

**站点可加载，但显示 SSL 警告** 这通常意味着证书已缓存或为旧证书。请尝试清除浏览器缓存，或再等待几分钟，直至传播完成。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://isbm.savimbo.com/practice-guide/zh-cn/ru-men-zhi-nan/she-zhi-zi-ding-yi-yu-ming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
