# 概览

Canonical URL: https://developers.iagenify.com/zh/sdk/ref/domain/
Language: zh

附属域名: 国家、记录、邮件, 以及是否安全转接我们。

Status: records, hosting and mail · status is proof

| 成员 | 功能 |
| --- | --- |
| [(支票)](/zh/sdk/ref/domain/check) | 重读区域。 这就是移动的动作 `status`. |
| [(移徙)](/zh/sdk/ref/domain/migration) | 现在换换会打破什么吗? |
| [(服务)](/zh/sdk/ref/domain/serve) · [保留()](/zh/sdk/ref/domain/unserve) | 使主机名实际服务。 |
| [删除( m)](/zh/sdk/ref/domain/remove) | 把它拆下来 |
| [记录记录记录](/zh/sdk/ref/domain/records/list) | `list` · `set` · `remove` · `import`. |
| [邮件邮件](/zh/sdk/ref/domain/mail/enable) | `enable` · `status` · `hosts` · `dmarc` · `bimi` · `disable`. |
| [attach()](/zh/sdk/ref/domain/attach) · [attachments()](/zh/sdk/ref/domain/attach) | Put a host of the account behind the name. |
| [redirects](/zh/sdk/ref/domain/redirects) | Send `www` — or the root — somewhere else. |
| [owner()](/zh/sdk/ref/domain/owner) · [tls()](/zh/sdk/ref/domain/tls) | The registry's view, and the certificates. |
| [dnssec](/zh/sdk/ref/domain/dnssec) · [verify()](/zh/sdk/ref/domain/verify) | Sign the zone; prove the domain to a service. |

## 随它携带的 {#properties}

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `name` | string |  | 域名 。 |
| `status` | string |  | `pending_nameservers` 直到登记员在这里指出; `active` 之后。 |
| `nameservers` | string[] |  | 登记员要怎么安排 **读读它们; 永远不要硬码一对。** |
| `dns` | object |  | `{ mxOk, spfOk, dkimOk, dmarcOk, checkedAt }` - 邮件证人。 |
| `imported` | object |  | `{ found, added, at }` - 收购案发现和复制的东西 |
| `mailHosts` | array |  | 启用邮件的主机, 每个主机都有其选择人和证人。 |
| `registrar` | string |  | 是谁登记了 |

## 主机, 不仅仅是一个域名 {#two-levels}

> **顶部和子域是单独邮寄的**
>
> 每个邮件地址都有自己的记录、自己的钥匙和自己的政策——最高记录并不覆盖子域。 因此,邮件地址是一份清单,每个邮件通话都使用子域。

## 通常顺序 {#sequence}

```javascript
const domain = await api.domains.get("example.com");

await domain.migration();          // safe to switch?
await domain.records.import();     // if not
await domain.check();              // until status is "active"
await domain.mail.enable();        // then mail
```

- [migration()](/zh/sdk/ref/domain/migration): 安全换位了吗?
- [records.set()](/zh/sdk/ref/domain/records/set): 写记录
- [mail.enable()](/zh/sdk/ref/domain/mail/enable): 一次打来邮件

```python
domain = api.domains.get("example.com")

domain.migration()            # safe to switch?
domain.records.import_zone()  # if not
domain.check()                # until status is "active"
domain.mail.enable()          # then mail
```
