51DNS (DNS.COM) Configuration Guide
Overview
51DNS (DNSCOM) (formerly dns.com, now 51dns.com) is a domain name resolution service provider that provides authoritative DNS resolution services and supports the creation and updating of dynamic DNS records. This DDNS project uses API Key and Secret Key for API authentication.
⚠️ Notice: 51DNS (DNSCOM) Provider is currently in pending verification status, lacking sufficient real-world testing. Please report issues via GitHub Issues.
Official Website: https://www.51dns.com/
Authentication Information
API Key + Secret Key Authentication
51DNS uses API Key and Secret Key for API authentication, which is the official recommended authentication method.
Obtaining Authentication Information
- Log into 51DNS/DNS.COM Console
- Navigate to "API Management" page
- Click "Create API Key"
- Record the generated API Key and Secret Key, please keep them safe
{
"dns": "dnscom",
"id": "your_api_key", // 51DNS API Key
"token": "your_secret_key" // 51DNS Secret Key
}Complete Configuration Example
{
"$schema": "https://ddns.newfuture.cc/schema/v4.1.json", // Format validation
"dns": "dnscom", // Current provider
"id": "your_api_key", // 51DNS API Key
"token": "your_secret_key", // 51DNS Secret Key
"index4": ["url:http://api.ipify.cn", "public"], // IPv4 address source
"index6": "public", // IPv6 address source
"ipv4": ["ddns.newfuture.cc"], // IPv4 domains
"ipv6": ["ddns.newfuture.cc", "ipv6.ddns.newfuture.cc"], // IPv6 domains
"line": "1", // Resolution line
"ttl": 600 // DNS record TTL (seconds)
}Parameter Description
| Parameter | Description | Type | Range/Options | Default | Parameter Type |
|---|---|---|---|---|---|
| dns | Provider ID | String | dnscom | None | Provider |
| id | Authentication ID | String | 51DNS API Key | None | Provider |
| token | Authentication Key | String | 51DNS Secret Key | None | Provider |
| index4 | IPv4 source | Array | Reference | default | Common Config |
| index6 | IPv6 source | Array | Reference | default | Common Config |
| ipv4 | IPv4 domains | Array | Domain list | None | Common Config |
| ipv6 | IPv6 domains | Array | Domain list | None | Common Config |
| line | Resolution line | String | See below | 1 | Provider |
| ttl | TTL time | Integer (seconds) | See below | 600 | Provider |
| proxy | Proxy settings | Array | Reference | None | Common Network |
| ssl | SSL verification | Boolean/String | "auto", true, false | auto | Common Network |
| cache | Cache settings | Boolean/String | true, false, filepath | true | Common Config |
| log | Log configuration | Object | Reference | None | Common Config |
Parameter Type Description:
- Common Config: Standard DNS configuration parameters applicable to all supported DNS providers
- Common Network: Network setting parameters applicable to all supported DNS providers
- Provider: Supported by current provider, values related to current provider
Note: Values supported for
ttlandlinemay vary depending on your service plan.
ttl
The ttl parameter specifies the Time To Live (TTL) of DNS records in seconds. 51DNS supports TTL ranges from 60 to 86400 seconds (1 day). If not set, the default value is used.
| Plan Type | Supported TTL Range (seconds) |
|---|---|
| Free | 600 - 86400 |
| Professional | 60 - 86400 |
| Enterprise | 10 - 86400 |
| Premium | 1 - 86400 |
Note: For specific TTL ranges, please refer to 51DNS official documentation
line
The line parameter specifies DNS resolution lines. 51DNS supported lines:
| Line ID | Description |
|---|---|
| 1 | Default |
| 2 | China Telecom |
| 3 | China Unicom |
| 4 | China Mobile |
For more lines reference: Official Documentation ViewID
Troubleshooting
Debug Mode
Enable debug logging to view detailed information:
ddns -c config.json --debugCommon Issues
- Authentication Failed: Check if API Key and Secret Key are correct, ensure API key status is enabled
- Domain Not Found: Ensure domain is added to 51DNS account, configuration spelling is correct, domain is in active status
- Record Creation Failed: Check if subdomain has conflicting records, TTL settings are reasonable, confirm modification permissions
- Request Rate Limit: 51DNS has API call rate limits (maximum 100 times per minute), reduce request frequency
API Error Codes
| Error Code | Description | Solution |
|---|---|---|
| 0 | Success | Operation successful |
| 1 | Parameter error | Check request parameters |
| 2 | Authentication failed | Check API credentials |
| 3 | Insufficient permissions | Check API permissions |
| 4 | Record not found | Check domain and record |
| 5 | Domain not found | Check domain configuration |
Support & Resources
⚠️ Pending Verification: 51DNS Provider lacks sufficient real-world testing. It is recommended to thoroughly test before using in production environments. Please report any issues via GitHub Issues.