<aliases>
Summary
Wraps a collection of host aliases for flexible domain routing.
The <aliases> element acts as a container for multiple <alias> elements within a <host> configuration. Think of it as your host's "also known as" list—useful when you need one PageSeeder host to respond to multiple domain names.
This element only appears in the response when at least one alias exists for the host. If there are no aliases, it is omitted entirely.
Usage context
| Permitted content | <alias> |
|---|---|
| Permitted parent | <host> |
Attributes
None. This element is purely a container—all the configuration happens in the child <alias> elements.
Examples
Imagine you're running a PageSeeder instance for a company that uses multiple domains:
- Primary domain:
app.example.com - Legacy domain:
app.example.org - Content delivery network:
app.example.net - Local development:
app.localhost
XML Example
Here's a host configured with multiple aliases:
<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>
JSON Example
The same configuration in JSON format:
{
"host": {
"id": 1,
"name": "app.example.com",
"external": false,
"aliases": [
{
"id": 1,
"name": "app.example.org"
},
{
"id": 2,
"name": "app.example.net"
},
{
"id": 3,
"name": "app.localhost"
},
{
"id": 4,
"name": "local.example.org"
}
]
}
}Schema
XML Schema
<xs:element name="aliases" type="aliases"/>
<xs:complexType name="aliases">
<xs:sequence>
<xs:element name="alias"
type="alias"
minOccurs="1"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://dev.pageseeder.com/schema/api/aliases.json",
"title": "Aliases",
"description": "A collection of host aliases for domain routing",
"type": "array",
"items": {
"$ref": "https://dev.pageseeder.com/schema/api/alias.json"
},
"minItems": 1,
"uniqueItems": true
}
- Empty means absent: Don't expect an empty
<aliases>element, if there are no aliases, the element won't be present at all. - Order doesn't matter: Aliases are evaluated as a set, not a sequence. The order in the list has no significance.
- Validation happens at the alias level: Each
<alias>is validated independently. See the<alias>documentation for constraints on individual aliases.
Compatibility
Stable since initial API release. No breaking changes.