github.com/teknogeek/dnscontrol/v2@v2.10.1-0.20200227202244-ae299b55ba42/docs/_providers/name.com.md (about)

     1  ---
     2  name: Name.com
     3  title: Name.com Provider
     4  layout: default
     5  jsId: NAMEDOTCOM
     6  ---
     7  
     8  # Name.com Provider
     9  
    10  ## Configuration
    11  In your credentials file you must provide your name.com api username and access token:
    12  
    13  {% highlight json %}
    14  {
    15    "name.com":{
    16      "apikey": "yourApiKeyFromName.com",
    17      "apiuser": "yourUsername"
    18    }
    19  }
    20  {% endhighlight %}
    21  
    22  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:
    23  
    24      "apiurl": "https://api.dev.name.com",
    25  
    26  export NAMEDOTCOM_URL='api.name.com'
    27  
    28  
    29  ## Metadata
    30  This provider does not recognize any special metadata fields unique to name.com.
    31  
    32  ## Usage
    33  **Example Javascript (DNS hosted with name.com):**
    34  
    35  {% highlight js %}
    36  var REG_NAMECOM = NewRegistrar("name.com","NAMEDOTCOM");
    37  var NAMECOM = NewDnsProvider("name.com","NAMEDOTCOM");
    38  
    39  D("example.tld", REG_NAMECOM, DnsProvider(NAMECOM),
    40      A("test","1.2.3.4")
    41  );
    42  {%endhighlight%}
    43  
    44  
    45  **Example Javascript (Registrar only. DNS hosted elsewhere):**
    46  
    47  {% highlight js %}
    48  var REG_NAMECOM = NewRegistrar("name.com","NAMEDOTCOM");
    49  var R53 = NewDnsProvider("r53", "ROUTE53");
    50  
    51  D("example.tld", REG_NAMECOM, DnsProvider(R53),
    52      A("test","1.2.3.4")
    53  );
    54  {%endhighlight%}
    55  
    56  {% include alert.html text="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." %}
    57  
    58  ## Activation
    59  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.
    60  
    61  ## Tips and error messages
    62  
    63  ### invalid character '<'
    64  
    65  ```
    66  integration_test.go:140: api returned unexpected response: invalid character '<' looking for beginning of value
    67  ```
    68  
    69  This error means an invalid URL is being used to reach the API
    70  endpoint.  It usually means a setting is `api.name.com/api` when
    71  `api.name.com` is correct (i.e. remove the `/api`).
    72  
    73  In integration tests:
    74  
    75   * Wrong: `export NAMEDOTCOM_URL='api.name.com/api'`
    76   * Right: `export NAMEDOTCOM_URL='api.name.com'`
    77  
    78  In production, the `apiurl` setting in creds.json is wrong. You can
    79  simply leave this option out and use the default, which is correct.
    80  
    81  TODO(tlim): Improve the error message. (Volunteer needed!)
    82  
    83  
    84  ### dial tcp: lookup https: no such host
    85  
    86  ```
    87  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
    88  ```
    89  
    90  When running integration tests, this error
    91  means you included the `https://` in the `NAMEDOTCOM_URL` variable.
    92  You meant to do something like `export NAMEDOTCOM_URL='api.name.com' instead.
    93  
    94  In production, the `apiurl` setting in creds.json needs to be
    95  adjusted. You can simply leave this option out and use the default,
    96  which is correct. If you are using the EO&T system, leave the
    97  protocol (`http://`) off the URL.