mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-01-12 02:17:43 +08:00
20dad35167
* Replace Jekyll highlight tags with fenced code blocks Replace Jekyll highlight tags with fenced code blocks. Canonicalize javascript to js. Correct highlighting languages. Add highlighting to code blocks. Remove leading $ from bash blocks. Remove empty lines at start and end of code blocks. Stripped trailing whitespace. * Fix language of code highlighting
1.7 KiB
1.7 KiB
name | layout | jsId |
---|---|---|
Namecheap Provider | default | NAMECHEAP |
Namecheap Provider
Namecheap only provides a registrar provider implementation.
Configuration
In your providers config json file you must provide your Namecheap api username and key:
{
"namecheap":{
"apikey": "yourApiKeyFromNameCheap",
"apiuser": "yourUsername"
}
}
You can optionally specify BaseURL to use a different endpoint - typically the sandbox:
{
"namecheap.com":{
"apikey": "yourApiKeyFromNameCheap",
"apiuser": "yourUsername"
"BaseURL": "https://api.sandbox.namecheap.com/xml.response"
}
}
if BaseURL is omitted, the production namecheap url is used.
Metadata
This provider does not recognize any special metadata fields unique to Namecheap.
Usage
Example Javascript:
var REG_NAMECHEAP = NewRegistrar("namecheap","NAMECHEAP");
var R53 = NewDnsProvider("r53", "ROUTE53");
D("example.tld", REG_NAMECHEAP, DnsProvider(R53),
A("test","1.2.3.4")
);
Namecheap provides custom redirect records URL, URL301, and FRAME. These records can be used like any other record:
var REG_NAMECHEAP = NewRegistrar("namecheap","NAMECHEAP");
var NAMECHEAP = NewDnsProvider("namecheap","NAMECHEAP");
D("example.tld", REG_NAMECHEAP, DnsProvider(NAMECHEAP),
URL('@', 'http://example.com/'),
URL('www', 'http://example.com/'),
URL301('backup', 'http://backup.example.com/')
)
Activation
In order to activate API functionality on your Namecheap account, you must enable it for your account and wait for their review process. More information on enabling API access is located here.