DNSHE 免费域名续期与 API 续期使用方法

本文档指导如何通过 DNSHE 控制台或 API 接口,对即将到期的免费域名进行手动或自动化续期。

一、 核心续期规则

  • 续期窗口:域名到期前 180 天 开启。

  • 网页操作:登录后台,点击域名旁出现的“免费续期”按钮,成功后会提示新的到期时间。

  • x1.png
  • 费用:完全免费


二、 API 自动化续期流程

如果您有多个域名需要维护,建议使用 API 方式。

第一步:获取 API 密钥

在 DNSHE 域名页面-[API 管理] 页面创建并保存以下两个关键信息:

  • X-API-Key

  • X-API-Secret

第二步:获取域名 ID (subdomain_id)

在执行续期前,您需要先获取目标域名的内部 ID。

查询命令:

curl -X GET "https://api005.dnshe.com/index.php?m=domain_hub&endpoint=dns_records&action=list" \ -H "X-API-Key: 您的Key" \ -H "X-API-Secret: 您的Secret"
 
返回结果解析示例: 接口会返回一个包含所有域名的列表,请从中找到 id 字段。
{
"success": true,
"subdomains": [
{
"id": 1,
"subdomain": "1.de5.net",
"status": "active"
},
...
]
}

第三步:提交续期请求

使用获取到的 id 替换下方命令中的 subdomain_id 参数。

续期命令:curl -X GET "https://api005.dnshe.com/index.php?m=domain_hub&endpoint=dns_records&action=list&subdomain_id=1" \
-H "X-API-Key: 您的Key" \
-H "X-API-Secret: 您的Secret"

三、 续期结果确认

当您执行完续期命令后,请检查返回的 JSON 数据:

  1. 续期成功示例:{
    "success": true,
    "message": "Subdomain renewed successfully",
    "subdomain_id": 1,
    "previous_expires_at": "2026-01-05 00:00:00",
    "new_expires_at": "2027-01-05 00:00:00",
    "charged_amount": 0,
    "remaining_days": 365
    }
  2. 检查点successtruenew_expires_at 已更新为一年以后。
  3. 状态码参考表

    字段 说明
    previous_expires_at 续期前的旧到期时间
    new_expires_at 续期后的新到期时间
    charged_amount 费用(0 代表免费)
    remaining_days 距离新到期日剩余的天数
 
  • 免费域名, 免费域名api, 域名续期, 续费域名
  • 16 用户发现这个很有用
此文章对您是否有帮助?

相关文章

免费域名服务API使用文档

欢迎使用免费域名API服务。   本 API 旨在为开发者提供高效、便捷的域名管理解决方案,支持子域名注册、DNS 记录配置、API...

DNSHE免费域名API使用文档(V2.0)

DNSHE免费域名API使用文档(V2.0) 基本信息 API地址:`https://api005.dnshe.com/index.php?m=domain_hub` 认证方式:API...