Enable CDN
Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server.
Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server. Works for the main domain, parked domains and subdomains of the account.
Enabling changes the domain's DNS records and usually takes a few seconds. After that, DNS propagation can take a few more minutes before visitors are served through the CDN.
Repeating the call is safe, for example after a timeout. When CDN is already enabled, it applies the DNS change again and refreshes the CDN SSL certificate.
Returns 422 when the account is disabled, while the account is being moved to another server (retry after the move finishes), or when the CDN provider rejects the change. Returns 404 when the domain is not a website on the account.
API Token authentication
u123456789Domain name
mydomain.tldSuccess empty response
Request acceptedUnauthenticated response
Validation error response
Error response
POST /api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"message": "Request accepted"
}Last updated
Was this helpful?