github.com/StackExchange/dnscontrol/v4@v4.11.0/documentation/provider/namecheap.md (about)

     1  This is the provider for [Namecheap](https://www.namecheap.com/).
     2  
     3  ## Configuration
     4  
     5  To use this provider, add an entry to `creds.json` with `TYPE` set to `NAMECHEAP`
     6  along with your Namecheap API username and key:
     7  
     8  Example:
     9  
    10  {% code title="creds.json" %}
    11  ```json
    12  {
    13    "namecheap": {
    14      "TYPE": "NAMECHEAP",
    15      "apikey": "yourApiKeyFromNameCheap",
    16      "apiuser": "yourUsername"
    17    }
    18  }
    19  ```
    20  {% endcode %}
    21  
    22  You can optionally specify BaseURL to use a different endpoint - typically the
    23  sandbox:
    24  
    25  {% code title="creds.json" %}
    26  ```json
    27  {
    28    "namecheapSandbox": {
    29      "TYPE": "NAMECHEAP",
    30      "apikey": "yourApiKeyFromNameCheap",
    31      "apiuser": "yourUsername",
    32      "BaseURL": "https://api.sandbox.namecheap.com/xml.response"
    33    }
    34  }
    35  ```
    36  {% endcode %}
    37  
    38  if BaseURL is omitted, the production namecheap URL is assumed.
    39  
    40  
    41  ## Metadata
    42  This provider does not recognize any special metadata fields unique to
    43  Namecheap.
    44  
    45  ## Usage
    46  An example configuration:
    47  
    48  {% code title="dnsconfig.js" %}
    49  ```javascript
    50  var REG_NAMECHEAP = NewRegistrar("namecheap");
    51  var DSP_BIND = NewDnsProvider("bind");
    52  
    53  D("example.com", REG_NAMECHEAP, DnsProvider(DSP_BIND),
    54      A("test", "1.2.3.4"),
    55  END);
    56  ```
    57  {% endcode %}
    58  
    59  Namecheap provides custom redirect records URL, URL301, and FRAME.  These
    60  records can be used like any other record:
    61  
    62  {% code title="dnsconfig.js" %}
    63  ```javascript
    64  var REG_NAMECHEAP = NewRegistrar("namecheap");
    65  var DSP_NAMECHEAP = NewDnsProvider("namecheap");
    66  
    67  D("example.com", REG_NAMECHEAP, DnsProvider(DSP_NAMECHEAP),
    68    URL("@", "http://example.com/"),
    69    URL("www", "http://example.com/"),
    70    URL301("backup", "http://backup.example.com/"),
    71  END)
    72  ```
    73  {% endcode %}
    74  
    75  ## Activation
    76  In order to activate API functionality on your Namecheap account, you must
    77  enable it for your account and wait for their review process. More information
    78  on enabling API access is [located
    79  here](https://www.namecheap.com/support/api/intro.aspx).