# domain.records

Canonical URL: https://developers.iagenify.com/sdk/workflows/steps/domain-records/
Language: en

`type: "domain.records"`

Writes in a domain's DNS zone. It requires a human step upstream, and an NS record is refused outright.

Status: needs approval upstream · set or remove · NS refused

> **A human step is required upstream**
>
> This acts outside the account, and a run has nobody to ask. The definition is refused when you save it unless a human step sits on the path that reaches this one.

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `domain` | string | required | Which domain. |
| `action` | string | required | `set` or `remove`. |
| `type` | string |  | Required by `set`. **`NS` is refused.** |
| `name` | string |  | Required by `set`. Relative to the zone. |
| `content` | string |  | Required by `set`. |
| `record` | string |  | Required by `remove`. |

```javascript
{ id: "point", type: "domain.records", config: {
    domain: "example.com", action: "set",
    type: "CNAME", name: "docs", content: "{{steps.host.output.url}}" } }
```

## NS is refused {#ns}

> **A record delegating a name away is a subdomain takeover**
>
> The type is not accepted at all, on save. There is no legitimate use of it from a workflow that outweighs what the illegitimate one does.

## Why one wrong record is two outages {#why-approval}

A mail record pointed at the wrong host stops mail arriving with nothing appearing broken; an address record moved stops a site. Neither has a previous version to restore — which is why no mode and no trigger opens this without a person.

## Output {#output}

```javascript
{{steps.point.output.id}}       // the record
{{steps.point.output.type}}
{{steps.point.output.content}}
```

## A record does not make a name serve {#serving}

The platform that serves must also accept the name, or its edge refuses the connection. For a host on IaGenify, attach the domain to the host rather than writing a record by hand.

- [human](/sdk/workflows/steps/human): The approval these three require.
- [records.set()](/sdk/ref/domain/records/set): From code.
- [Workflow steps](/sdk/workflows/steps): The 23 types.

```python
{"id": "point", "type": "domain.records", "config": {
    "domain": "example.com", "action": "set",
    "type": "CNAME", "name": "docs", "content": "{{steps.host.output.url}}"}}
```

```python
"{{steps.point.output.id}}"       # the record
"{{steps.point.output.type}}"
"{{steps.point.output.content}}"
```
