v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
DomainInfo
Domain Information

Return built-in subdomain aliases

This function returns the built-in subdomain aliases for an account's main domain.

Note:

This function retrieves data from the /var/cpanel/userdata/user/domain file, where user represents the cPanel account username and domain represents the domain. For this reason, actual output may not contain all of the returns that this document lists.

get/DomainInfo/main_domain_builtin_subdomain_aliases

Query parameters

hide_temporary_domains1 | 0
Example:1

Whether to hide domain aliases if the main domain is a temporary domain.

  • 1 — Return empty array if the main domain is a temporary domain.
  • 0 — Show aliases regardless of domain type.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "main_domain_builtin_subdomain_aliases",
  "module": "DomainInfo",
  "result": {
    "data": [
      "mail",
      "www"
    ],
    "metadata": {
      "transformed": 1
    },
    "status": 1
  }
}