---
title: "Service: /hosts [POST]"
source: https://dev.pageseeder.com/api/services/hosts_post.html
description: "Creates a new host in PageSeeder. Requires administrator permissions. Parameters include host name (required, 2-255 characters), external status, and virtual status. Returns created host details wrapped in host-creation element."
last_updated: 2026-09-08T13:54:58+10:00
document_type: api_endpoint
operation_id: host-POST
resource_id: host
path_template: /hosts
http_method: POST
api_category: host
implementation_version: 6.2004
api_since: 5.8900
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: N/A
generated_at: 2026-09-02
tokens: ~399
---

# /hosts \[POST\]

## Description

Creates a host.

> **Tip:** Before you create a new host, consider whether creating a new host alias is more appropriate. To create an alias to existing host, use the following service: [/hosts/\{hostname\}/hostaliases \[POST\]](create-hostalias_post.md)

## Parameters

| Name | Description | Required | Type | Default value |
| --- | --- | --- | --- | --- |
| name | The name of the host | yes | string |  |
| external | Whether the host is external | no | boolean | false |
| virtual | Whether the host is virtual. *PageSeeder v5.99 or higher.* | no | boolean | false |

#### name

The name of the host to create must be at least two characters long, at most 255 characters long, a valid host according to [RFC 3986 - section 3.2.2 host](https://tools.ietf.org/html/rfc3986#section-3.2.2), and match the following regular expression:

```regex
([a-z0-9]([a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]([a-z0-9-]*[a-z0-9])?
```

PageSeeder supports IPv4 addresses and regular names.

> **Note:** The hostname is not case-sensitive and it is not case-preserving: it is always converted to lower case before being stored in the database.

## Permission

This service requires administrator.

## Response

If successful, the created host is returned as a single `<host>` element wrapped in a `<host-creation>` element.

```xml

<host-creation>
  <host id="2" name="acme.com" external="false" virtual="false"/>
</host-creation>
```

> **Note:** Since the host has only been created, it won’t include any alias.

## Error Handling

No specific errors expected for this service.

