Skip to content

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

  1. Log into 51DNS/DNS.COM Console
  2. Navigate to "API Management" page
  3. Click "Create API Key"
  4. Record the generated API Key and Secret Key, please keep them safe
jsonc
{
    "dns": "dnscom",
    "id": "your_api_key",      // 51DNS API Key
    "token": "your_secret_key" // 51DNS Secret Key
}

Complete Configuration Example

jsonc
{
    "$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

ParameterDescriptionTypeRange/OptionsDefaultParameter Type
dnsProvider IDStringdnscomNoneProvider
idAuthentication IDString51DNS API KeyNoneProvider
tokenAuthentication KeyString51DNS Secret KeyNoneProvider
index4IPv4 sourceArrayReferencedefaultCommon Config
index6IPv6 sourceArrayReferencedefaultCommon Config
ipv4IPv4 domainsArrayDomain listNoneCommon Config
ipv6IPv6 domainsArrayDomain listNoneCommon Config
lineResolution lineStringSee below1Provider
ttlTTL timeInteger (seconds)See below600Provider
proxyProxy settingsArrayReferenceNoneCommon Network
sslSSL verificationBoolean/String"auto", true, falseautoCommon Network
cacheCache settingsBoolean/Stringtrue, false, filepathtrueCommon Config
logLog configurationObjectReferenceNoneCommon 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 ttl and line may 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 TypeSupported TTL Range (seconds)
Free600 - 86400
Professional60 - 86400
Enterprise10 - 86400
Premium1 - 86400

Note: For specific TTL ranges, please refer to 51DNS official documentation

line

The line parameter specifies DNS resolution lines. 51DNS supported lines:

Line IDDescription
1Default
2China Telecom
3China Unicom
4China Mobile

For more lines reference: Official Documentation ViewID

Troubleshooting

Debug Mode

Enable debug logging to view detailed information:

sh
ddns -c config.json --debug

Common 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 CodeDescriptionSolution
0SuccessOperation successful
1Parameter errorCheck request parameters
2Authentication failedCheck API credentials
3Insufficient permissionsCheck API permissions
4Record not foundCheck domain and record
5Domain not foundCheck 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.

Released under the MIT License