2017-01-11 13:02:45 -07:00
---
name: A
parameters:
- name
- address
- modifiers...
2023-01-12 16:59:42 -05:00
parameter_types:
name: string
address: string | number
"modifiers...": RecordModifier[]
2017-01-11 13:02:45 -07:00
---
A adds an A record To a domain. The name should be the relative label for the record. Use `@` for the domain apex.
2023-01-20 13:56:20 +01:00
The address should be an ip address, either a string, or a numeric value obtained via [IP ](../global/IP.md ).
2017-01-11 13:02:45 -07:00
2023-01-20 13:56:20 +01:00
Modifiers can be any number of [record modifiers ](https://docs.dnscontrol.org/language-reference/record-modifiers ) or JSON objects, which will be merged into the record's metadata.
2017-01-11 13:02:45 -07:00
2023-03-13 21:30:21 +01:00
{% code title="dnsconfig.js" %}
2023-01-20 13:56:20 +01:00
``` javascript
2023-06-18 05:35:13 +02:00
D ( "example.com" , REG _MY _PROVIDER , DnsProvider ( DSP _MY _PROVIDER ) ,
2017-01-11 13:02:45 -07:00
A ( "@" , "1.2.3.4" ) ,
A ( "foo" , "2.3.4.5" ) ,
A ( "test.foo" , IP ( "1.2.3.4" ) , TTL ( 5000 ) ) ,
A ( "*" , "1.2.3.4" , { foo : 42 } )
) ;
2022-02-17 18:22:31 +01:00
```
2023-03-13 21:30:21 +01:00
{% endcode %}