List website subdomains
Retrieve all subdomains created under the selected website.
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:
u123456789domainstringRequiredExample:
Domain name
mydomain.tldResponses
200
Success response
application/json
Array of Hosting.V1.Domains.SubdomainResource
usernamestringOptionalExample:
Website username
u123456789domainstringOptionalExample:
Full subdomain
blog.example.comparent_domainstringOptionalExample:
Parent website domain
example.comroot_directorystringOptionalExample:
Subdomain root directory
/home/u123456789/domains/blog.example.com/public_htmlsubdomainstringOptionalExample:
Subdomain prefix
blog401
Unauthenticated response
application/json
500
Error response
application/json
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?