---
title: "Element <alias>"
source: https://dev.pageseeder.com/api/elements/element_alias.html
description: "API Element reference for <alias>"
last_updated: 2026-08-07T17:09:54+10:00
tokens: ~452
---

# \<alias\>

## Summary

The alias of an existing [host](../../reference/glossary/host.md) in PageSeeder.

This  alias of a `<host>` in PageSeeder.

## Usage context

| Permitted content | none (empty) |
| --- | --- |
| Permitted parent | `<aliases>` |

## Attributes

This element includes the following attributes.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| id | `xs:long` | yes | The ID of the group |
| name | `xs:string` | yes | The hostname of the alias |

### `@id`

The PageSeeder database identifier for the alias. It is always an immutable positive long value that is unique on a specific PageSeeder server within the set all aliases.

### `@name`

The name of this alias, which must be a valid domain name. The value is not case-sensitive and cannot exceed 255 characters.

## Examples

A host with aliases:

```lang-xml

<host id="1" name="app.example.com" external="false">
  <aliases>
    <alias id="1" name="app.example.org"/>
    <alias id="2" name="app.example.net"/>
    <alias id="3" name="app.localhost"/>
    <alias id="4" name="local.example.org"/>
  </aliases>
</host>
```

## Schema

### XML Schema

```lang-xml

<xs:element name="alias" type="alias"/>

<xs:complexType name="alias">
  <xs:attribute name="id"   type="id"       use="required"/>
  <xs:attribute name="name" type="hostname" use="required"/>
</xs:complexType>

<xs:simpleType name="hostname">
  <xs:restriction base="xs:string">
    <xs:maxLength value="100"/>
    <xs:pattern
value="([a-z0-9]([a-z0-9-]*[a-z0-9])?\.?)+[a-z0-9]([a-z0-9-]*[a-z0-9])?"/>
  </xs:restriction>
</xs:simpleType>
```

### Relax Schema

```lang-relax
element host {
   attribute id       { xs:long },
   attribute name     { text { maxLength = "100"}},
}
```

## Compatibility

No change since initial API release.

