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

Enable CDN

Turns on the Hostinger CDN for the website domain, which speeds up page loads and reduces the load on the server.

Enable CDN

post

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
usernamestringRequiredExample: u123456789
domainstringRequired

Domain name

Example: mydomain.tld
Responses
200

Success empty response

application/json
messagestringOptionalExample: Request accepted
post/api/hosting/v1/accounts/{username}/websites/{domain}/cdn/enable
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?