Billionmail/BillionMail · error

unsupported DNS provider: %s, supported providers: %s

Error message

unsupported DNS provider: %s, supported providers: %s

What it means

Parameter check in AcmeCLI.Validate: the configured DnsProvider is not in the hard-coded supported list (tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy), so acme.sh has no DNS API script for it. The error interpolates the offending provider and the full supported list.

Source

Thrown at core/internal/service/acme/cli.go:116

	// Check DNS provider if using DNS verification
	if cli.VerifyType == "dns" {
		if cli.DnsProvider == "" {
			return fmt.Errorf("DNS provider is required for DNS verification")
		}

		// Check if DNS provider is supported
		supportedProviders := []string{"tencentcloud", "alidns", "cloudxns", "azuredns", "cloudflare", "godaddy"}
		isSupported := false
		for _, provider := range supportedProviders {
			if cli.DnsProvider == provider {
				isSupported = true
				break
			}
		}

		if !isSupported {
			return fmt.Errorf("unsupported DNS provider: %s, supported providers: %s",
				cli.DnsProvider, strings.Join(supportedProviders, ", "))
		}

		// Check DNS config
		if cli.DnsConfig == nil || len(cli.DnsConfig) == 0 {
			return fmt.Errorf("DNS provider credentials are required for DNS verification")
		}
	}

	return nil
}

/**
 * @brief Apply for certificate
 * @return certificatePath, privateKeyPath, error
 */
func (cli *AcmeCLI) Apply() (string, string, error) {
	// Validate parameters

View on GitHub (pinned to fc36c76c05)

Solutions

  1. Use one of: tencentcloud, alidns, cloudxns, azuredns, cloudflare, godaddy (exact lowercase match)
  2. Map your provider alias to a supported name before calling Apply (e.g. aliyun -> alidns)
  3. Use HTTP verification instead if your DNS provider is unsupported

Example fix

// before
cli.DnsProvider = "route53" // unsupported
// after
cli.DnsProvider = "cloudflare" // or another supported provider
// alias map example
aliases := map[string]string{"aliyun": "alidns", "dnspod": "tencentcloud"}
Defensive patterns

Strategy: validation

Validate before calling

supported := map[string]bool{"tencentcloud": true, "alidns": true, "cloudxns": true, "azuredns": true, "cloudflare": true, "godaddy": true}
p := strings.ToLower(strings.TrimSpace(cli.DnsProvider))
if !supported[p] { return fmt.Errorf("provider %q unsupported; use one of the six listed in docs", p) }

Try / catch

if err := cli.Validate(); err != nil {
    if strings.Contains(err.Error(), "unsupported DNS provider") {
        log.Printf("fix --dns-provider (case-sensitive, see supported list): %v", err)
    }
    os.Exit(1)
}

Prevention

When it happens

Trigger: Setting DnsProvider to "route53", "dnspod", "Google", or any string not exactly matching a supported provider name, with VerifyType="dns".

Common situations: Users assuming their DNS host is supported; provider names with different casing or aliases (e.g. "aliyun" vs "alidns"); providers added in newer versions but the deployment runs older code.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of Billionmail/BillionMail@fc36c76c05 (2026-09-05). Data as JSON: /api/errors/df60dd44d55d5668. Report an issue: GitHub.