| name | hosting |
| requires_mcps | ["hostinger-api"] |
| description | Use when user says "Hostinger hosting", "upload site", or "shared hosting". Static deploys, files, domains, SSL. |
| last_updated | 2026-03-20 |
| doc_source | https://developers.hostinger.com |
Hostinger Hosting
The Hosting API manages shared hosting services — creating websites, listing orders, selecting datacenters, verifying domain ownership, and generating free subdomains.
Tool surface — prefer MCP
This skill is paired with the hostinger-api MCP (@hostinger/api-mcp-server). Prefer mcp__hostinger-api__hosting_* tools over raw curl. The curl examples below are the fallback path for debugging or when the MCP is unreachable — they are not the primary interface.
Available hosting tools:
hosting_listOrdersV1, hosting_listWebsitesV1 — inventory of orders and sites
hosting_createWebsiteV1 — provision a new website on an existing order
hosting_listAvailableDatacentersV1 — pick a datacenter region before create
hosting_generateAFreeSubdomainV1 — assign a free .hstgr.io-style subdomain
hosting_verifyDomainOwnershipV1 — validate a custom domain points at Hostinger
hosting_deployStaticWebsite — static-site deploy (canonical Vite storefront pattern)
hosting_deployJsApplication, hosting_listJsDeployments, hosting_showJsDeploymentLogs — JS-app deploys + log/inventory
hosting_deployWordpressPlugin, hosting_deployWordpressTheme, hosting_importWordpressWebsite — WordPress workflows
Table of Contents
Core Concepts
Websites
Websites are the core hosting resource. Each website is associated with a domain and a hosting order. Website types include main and addon websites. Creating a website triggers hosting account provisioning if it's the first on that plan.
Orders
Hosting orders represent purchased hosting plans. Orders can be filtered by status and ID. Shared access is supported — you can see orders from other accounts that have granted you access.
Datacenters
When creating the first website on a new hosting plan, you must select a datacenter. The first item in the datacenter list is the best match for your order requirements. Subsequent websites use the same datacenter automatically.
Domain Verification
Before using a domain for hosting, ownership must be verified. Hostinger free subdomains (*.hostingersite.com) skip verification. For other domains, add the provided TXT record to your DNS and verify. Propagation can take up to 10 minutes.
Free Subdomains
Hostinger provides free subdomains under *.hostingersite.com for immediate use without purchasing a custom domain.
Common Patterns
Create a Website (Full Flow)
curl -X GET "https://developers.hostinger.com/api/hosting/v1/datacenters?order_id=12345" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X POST "https://developers.hostinger.com/api/hosting/v1/domains/free-subdomains" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X POST "https://developers.hostinger.com/api/hosting/v1/domains/verify-ownership" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "domain": "example.com" }'
curl -X POST "https://developers.hostinger.com/api/hosting/v1/websites" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"domain": "example.com",
"order_id": 12345,
"datacenter_code": "us-east-1"
}'
Python SDK:
from hostinger_api import Hostinger
client = Hostinger(api_token="YOUR_API_TOKEN")
datacenters = client.hosting.datacenters.list(order_id=12345)
dc_code = datacenters[0].code
client.hosting.websites.create(
domain="example.com",
order_id=12345,
datacenter_code=dc_code
)
TypeScript SDK:
import { Hostinger } from "hostinger-api-sdk";
const client = new Hostinger({ apiToken: "YOUR_API_TOKEN" });
const datacenters = await client.hosting.datacenters.list({ orderId: 12345 });
const dcCode = datacenters[0].code;
await client.hosting.websites.create({
domain: "example.com",
orderId: 12345,
datacenterCode: dcCode,
});
PHP SDK:
use Hostinger\Api\HostingerApi;
$client = new HostingerApi('YOUR_API_TOKEN');
$datacenters = $client->hosting->datacenters->list(['order_id' => 12345]);
$dcCode = $datacenters[0]->code;
$client->hosting->websites->create([
'domain' => 'example.com',
'order_id' => 12345,
'datacenter_code' => $dcCode,
]);
List Websites
curl -X GET "https://developers.hostinger.com/api/hosting/v1/websites" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X GET "https://developers.hostinger.com/api/hosting/v1/websites?order_id=12345" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X GET "https://developers.hostinger.com/api/hosting/v1/websites?domain=example.com" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X GET "https://developers.hostinger.com/api/hosting/v1/websites?page=2&per_page=25" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
List Hosting Orders
curl -X GET "https://developers.hostinger.com/api/hosting/v1/orders" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
curl -X GET "https://developers.hostinger.com/api/hosting/v1/orders?statuses=active" \
-H "Authorization: Bearer $HOSTINGER_API_TOKEN"
API Reference
Datacenters
| Method | Endpoint | Description |
|---|
GET | /api/hosting/v1/datacenters | List available datacenters (requires order_id query param) |
Domains
| Method | Endpoint | Description |
|---|
POST | /api/hosting/v1/domains/free-subdomains | Generate a free subdomain |
POST | /api/hosting/v1/domains/verify-ownership | Verify domain ownership |
Orders
| Method | Endpoint | Description |
|---|
GET | /api/hosting/v1/orders | List hosting orders (paginated, filterable) |
Websites
| Method | Endpoint | Description |
|---|
GET | /api/hosting/v1/websites | List websites (paginated, filterable) |
POST | /api/hosting/v1/websites | Create a new website |
Query Parameters for Websites
| Parameter | Description |
|---|
page | Page number |
per_page | Items per page |
username | Filter by username |
order_id | Filter by order ID |
is_enabled | Filter by enabled status |
domain | Filter by domain name |
Best Practices
Website Creation
- Always select the recommended datacenter (first in the list) unless you have geographic requirements
datacenter_code is only required for the first website on a new hosting plan
- Domain name cannot start with
www. — use the bare domain
- Website creation takes up to a few minutes — poll the list endpoint to check status
Domain Verification
- Skip verification for Hostinger free subdomains (
*.hostingersite.com)
- DNS TXT record propagation can take up to 10 minutes
- Verify before attempting to create the website
Free Subdomains
- Use free subdomains for testing or getting started quickly
- You can connect a custom domain later
Orders
- Use filters to narrow down results instead of fetching everything
- Shared access orders appear alongside your own
Troubleshooting
Website Creation Failing
- Verify domain ownership first (unless using free subdomain)
- Ensure
order_id is valid and belongs to an active hosting plan
- For the first website,
datacenter_code is required
- Domain cannot start with
www.
Domain Verification Failing
- TXT record may not have propagated yet (wait up to 10 minutes)
- Verify TXT record is set correctly:
dig TXT example.com
- Ensure you're verifying the correct domain (bare domain, not subdomain)
Datacenter List Empty
- Ensure the
order_id parameter is provided and valid
- The order may not have available capacity in any datacenter
Website Not Appearing After Creation
- Website provisioning takes a few minutes
- Poll the websites list endpoint to check when it becomes available
References