Skip to content

dns_arvan.sh: Invalid domain error when issuing wildcard certificates #6788

@abooraja

Description

@abooraja

Problem
When trying to issue a wildcard certificate using dns_arvan DNS API, the script fails with "invalid domain" error.
Command used:
acme.sh --issue --dns dns_arvan -d mizekar.site -d '*.mizekar.site'
Error:
domain
[Sat Feb 14 01:18:10 +0330 2026] invalid domain
Root Cause
After debugging, I found that the _get_root() function in dnsapi/dns_arvan.sh is incorrectly trying to query the Arvan Cloud API:
Incorrect API usage: The function attempts to directly query /domains/{domain} endpoint (e.g., /domains/mizekar.site), but according to the Arvan Cloud API v4.0 documentation, the API requires fetching the complete domains list from /domains endpoint first, then searching within the response.
GET request bug: The _arvan_rest() function incorrectly appends $data parameter to GET request URLs.
Expected Behavior
The script should:
Successfully fetch the domains list from Arvan API
Find the domain ID from the list
Add TXT records for DNS challenge
Issue wildcard certificates without errors
Environment
acme.sh version: 3.1.3
DNS Provider: Arvan Cloud (ArvanCloud.ir)
API Version: 4.0
Domain: mizekar.site (wildcard: .mizekar.site)
Debug Information
From debug logs:
[Sat Feb 14 01:18:10 +0330 2026] GET[Sat Feb 14 01:18:10 +0330 2026] url='https://napi.arvancloud.ir/cdn/4.0/domains/mizekar.site'[Sat Feb 14 01:18:11 +0330 2026] h='site'[Sat Feb 14 01:18:11 +0330 2026] GET[Sat Feb 14 01:18:11 +0330 2026] url='https://napi.arvancloud.ir/cdn/4.0/domains/site'[Sat Feb 14 01:18:11 +0330 2026] invalid domain
The API correctly returns the domains list when querying /domains (without domain name), but the current implementation doesn't use this approach.
Proposed Solution
Modify _get_root() to fetch domains list from /domains endpoint first
Search for the domain within the response
Fix _arvan_rest() GET request handling
Improve error handling and record management
Related
API Documentation: https://www.arvancloud.ir/api/cdn/4.0#tag/Domain/operation/domains.index

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions