# 如何进行域名设置？

域名设置分为两个步骤：

## [步骤1：域名控制台解析域名](#1001) <a href="#id-1" id="id-1"></a>

如果您的域名备案（大陆之外无需备案），可以通过云厂商的域名控制台进行域名解析，操作如下：

1. 登录域名控制台->域名解析，进入解析设置界面（以阿里云为例）&#x20;

   ![](http://libs.websoft9.com/Websoft9/DocsPicture/zh/common/domain-websoft9.png)
2. 增加一条A记录，主机记录那里填写二级域名的前缀（如www,shop,test等）或通配符@，记录值填写您的服务器公网ip地址，保存
3. 域名解析成功，等待解析生效（不同的厂商解析生效时间不一样，1分钟-24小时不等）

注意：解析生效之后，本地访问可能由于缓存问题导致仍然没有生效，请清空浏览器缓存，然后[通过CMD命令行刷新本地DNS操作](http://zhihu.websoft9.com/3615/%E5%A6%82%E4%BD%95%E5%88%B7%E6%96%B0%E6%9C%AC%E5%9C%B0dns%E7%BC%93%E5%AD%98)

## [步骤2：新增网站或修改](#1002) <a href="#id-2" id="id-2"></a>

在BT中，新增网站首先就要填写域名。如果是修改网站，先删除就域名，然后再增加域名

![](http://libs.websoft9.com/Websoft9/DocsPicture/zh/btlinux/bt-linux-mdomain-websoft9.png)


---

# 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://websoft9.gitbook.io/bt-linux-image-guide/bt-bao-ta-mian-ban-jing-xiang-shou-ce-linux-1/ru-he-jin-hang-yu-ming-she-zhi.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.
