github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/provider/namedotcom.md (about) 1 {% hint style="info" %} 2 **NOTE**: This provider is currently has no maintainer. We are looking for 3 a volunteer. If this provider breaks it may be disabled or removed if 4 it can not be easily fixed. 5 {% endhint %} 6 7 ## Configuration 8 9 To use this provider, add an entry to `creds.json` with `TYPE` set to `NAMEDOTCOM` 10 along with your name.com API username and access token: 11 12 Example: 13 14 {% code title="creds.json" %} 15 ```json 16 { 17 "name.com": { 18 "TYPE": "NAMEDOTCOM", 19 "apikey": "yourApiKeyFromName.com", 20 "apiuser": "yourUsername" 21 } 22 } 23 ``` 24 {% endcode %} 25 26 There is another key name `apiurl` but it is optional and defaults to the correct value. If you want to use the test environment ("OT&E"), then add this: 27 28 "apiurl": "https://api.dev.name.com", 29 30 export NAMEDOTCOM_URL='api.name.com' 31 32 33 ## Metadata 34 This provider does not recognize any special metadata fields unique to name.com. 35 36 ## Usage 37 38 An example `dnsconfig.js` configuration with NAMEDOTCOM 39 as the registrar and DNS service provider: 40 41 {% code title="dnsconfig.js" %} 42 ```javascript 43 var REG_NAMECOM = NewRegistrar("name.com"); 44 var DSP_NAMECOM = NewDnsProvider("name.com"); 45 46 D("example.com", REG_NAMECOM, DnsProvider(DSP_NAMECOM), 47 A("test", "1.2.3.4"), 48 END); 49 ``` 50 {% endcode %} 51 52 An example `dnsconfig.js` configuration with NAMEDOTCOM 53 as the registrar and DNS only, DNS hosted elsewhere: 54 55 {% code title="dnsconfig.js" %} 56 ```javascript 57 var REG_NAMECOM = NewRegistrar("name.com"); 58 var DSP_R53 = NewDnsProvider("r53"); 59 60 D("example.com", REG_NAMECOM, DnsProvider(DSP_R53), 61 A("test","1.2.3.4"), 62 END); 63 ``` 64 {% endcode %} 65 66 {% hint style="info" %} 67 **NOTE**: name.com does not allow control over the NS records of your zones via the api. It is not recommended to use name.com's dns provider unless it is your only dns host. 68 {% endhint %} 69 70 ## Activation 71 In order to activate API functionality on your Name.com account, you must apply to the API program. The application form is [located here](https://www.name.com/reseller/apply). It usually takes a few days to get a response. After you are accepted, you should receive your API token via email. 72 73 ## Tips and error messages 74 75 ### invalid character '<' 76 77 ```text 78 integration_test.go:140: api returned unexpected response: invalid character '<' looking for beginning of value 79 ``` 80 81 This error means an invalid URL is being used to reach the API 82 endpoint. It usually means a setting is `api.name.com/api` when 83 `api.name.com` is correct (i.e. remove the `/api`). 84 85 In integration tests: 86 87 * Wrong: `export NAMEDOTCOM_URL='api.name.com/api'` 88 * Right: `export NAMEDOTCOM_URL='api.name.com'` 89 90 In production, the `apiurl` setting in `creds.json` is wrong. You can 91 simply leave this option out and use the default, which is correct. 92 93 TODO(tlim): Improve the error message. (Volunteer needed!) 94 95 96 ### dial tcp: lookup https: no such host 97 98 ```text 99 integration_test.go:81: Failed getting nameservers Get https://https//api.name.com/api/v4/domains/stackosphere.com?: dial tcp: lookup https: no such host 100 ``` 101 102 When running integration tests, this error 103 means you included the `https://` in the `NAMEDOTCOM_URL` variable. 104 You meant to do something like `export NAMEDOTCOM_URL='api.name.com' instead. 105 106 In production, the `apiurl` setting in `creds.json` needs to be 107 adjusted. You can simply leave this option out and use the default, 108 which is correct. If you are using the EO&T system, leave the 109 protocol (`http://`) off the URL.