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

Verify domain ownership

Verify ownership of a single domain and return the verification status.

Verify domain ownership

post

Verify ownership of a single domain and return the verification status.

Use this endpoint to check if a domain is accessible for you before using it for new websites. If the domain is accessible, the response will have is_accessible: true. If not, add the given TXT record to your domain's DNS records and try verifying again. Keep in mind that it may take up to 10 minutes for new TXT DNS records to propagate.

Skip this verification when using Hostinger's free subdomains (*.hostingersite.com).

Authorizations
AuthorizationstringRequired

API Token authentication

Body
domainstringRequired

Domain to verify ownership for

Example: example.com
Responses
200

Success response

application/json
domainstringOptional

Domain name

Example: example.com
is_accessiblebooleanOptional

Whether domain is accessible

Example: false
txt_to_verifystringOptional

TXT record for verification

Example: example.com=example-verification-code
post/api/hosting/v1/domains/verify-ownership
POST /api/hosting/v1/domains/verify-ownership HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "domain": "example.com",
  "is_accessible": false,
  "txt_to_verify": "example.com=example-verification-code"
}

Last updated

Was this helpful?