DDNS

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
{
    "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.0.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:

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 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 --debug

Common Issues

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.