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

Create domain forwarding

Create domain forwarding configuration. Use this endpoint to set up domain redirects to other URLs.

Create domain forwarding

post

Create domain forwarding configuration.

Use this endpoint to set up domain redirects to other URLs.

Authorizations
AuthorizationstringRequired

API Token authentication

Body
domainstringRequired

Domain name

Example: mydomain.tld
redirect_typestring · enumRequired

Redirect type

Example: 301Possible values:
redirect_urlstringRequired

URL to forward domain to

Example: https://forward.to.my.url
Responses
200

Success response

application/json
domainstring · nullableOptional

Domain name

Example: mydomain.tld
redirect_typestring · enumOptional

Redirect type

Example: 301Possible values:
redirect_urlstringOptional

URL domain is forwarded to

Example: https://forward.to.my.url
created_atstring · date-timeOptionalExample: 2025-02-27T11:54:22Z
updated_atstring · date-time · nullableOptionalExample: 2025-03-27T11:54:22Z
post/api/domains/v1/forwarding
POST /api/domains/v1/forwarding HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 90

{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url"
}
{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Last updated

Was this helpful?