For the complete documentation index, see llms.txt. This page is also available as Markdown.

List website subdomains

Retrieve all subdomains created under the selected website.

List website subdomains

get

Retrieve all subdomains created under the selected website.

Use this endpoint to inspect subdomain configuration for a specific website, including the parent domain and root directory assigned to each subdomain.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Responses
200

Success response

application/json
usernamestringOptional

Website username

Example: u123456789
domainstringOptional

Full subdomain

Example: blog.example.com
parent_domainstringOptional

Parent website domain

Example: example.com
root_directorystringOptional

Subdomain root directory

Example: /home/u123456789/domains/blog.example.com/public_html
subdomainstringOptional

Subdomain prefix

Example: blog
get/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains
GET /api/hosting/v1/accounts/{username}/websites/{domain}/subdomains HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "username": "u123456789",
    "domain": "blog.example.com",
    "parent_domain": "example.com",
    "root_directory": "/home/u123456789/domains/blog.example.com/public_html",
    "subdomain": "blog"
  }
]

Last updated

Was this helpful?