---
title: "Service: /hosts/{hostname}/hostaliases [POST]"
source: https://dev.pageseeder.com/api/services/create-hostalias-POST.html
description: "Creates an alias for an existing host. Requires administrator permissions. Accepts a host alias name as a parameter and returns the created alias wrapped in an alias-creation XML element."
last_updated: 2026-09-02T11:36:19+10:00
document_type: api_endpoint
operation_id: host-POST
resource_id: host
path_template: /hosts/{hostname}/hostaliases
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: ~185
---

# /hosts/\{hostname\}/hostaliases \[POST\]

## Description

Create an alias to an existing host.

The host must exist before an alias can be created.

To create a host use the [/hosts \[POST\] service](hosts-POST.md).

## Parameters

| Name | Description | Required | Type | Default value |
| --- | --- | --- | --- | --- |
| name | The name of the host alias | yes | string |  |

## Permission

This service requires administrator.

## Response

If successful, the created alias is returned as an `<alias>` element wrapped in an `<alias-creation>` element as in the following example:

```xml

<alias-creation>
  <alias id="2" name="www.acme.com" />
</alias-creation>
```

## Error Handling

No specific errors expected for this service.

