Skip to content
Myra Online Help Updated · 21 Aug 2026

Adding a redirect entry for a subdomain

Note

If the optional attributes are not set, the system adds a default value.

Note

The body does not contain the attributes id, created, and modified. The system sets the values of these attributes after the entry is created.

Sends a POST request to the endpoint /domain/{domainId}/redirects/{name}.

Description

The Add-Redirect request allows the user to add one or more redirect entries for a subdomain of the organisation.

Requirements

Values of the request: Domain-ID {domainId}, Subdomain name {name}

Objects: DnsRedirectVO

Request

To add one or more redirect entries for a subdomain, the Domain-ID {domainId} and the Subdomain name {name} need to be added to the path of the request.

For a detailed specification of which information is required to add a redirect entry, one or more objects DnsRedirectVO with the following attributes need to be defined in the body:

Attributes Description Values
source The path of a domain or subdomain that is to be redirected. string
destination The target to where the redirect pins. string
type The type of the redirect.
  • permanent -> HTTP status code 301
  • redirect -> HTTP status code 302
subDomainName The name of the subdomain. string

The following attributes are optional:

Attributes Description Values
matchingType The condition for the alignment.
  • exact
  • prefix
  • suffix
expertMode Defines whether the expert mode is enabled or disabled. If the expert mode is enabled, Myra skips the check of the rule for infinite loops.
  • true
  • false
sort The ascending order for the entry. integer
comment An individual comment for the entry. string
enabled The availability of the entry.
  • true
  • false

The system responds by returning the object DnsRedirectVO with the information about the new entry.

Example

Example request body:

{
  "objectType": "string",
  "source": "string",
  "destination": "string",
  "type": "string",
  "subDomainName": "string",
  "matchingType": "string",
  "expertMode": true,
  "sort": 0,
  "comment": "string",
  "enabled": true
}

Responses

The following responses are available:

STATUS CODE DESCRIPTION
201 The request has succeeded and a new object has been created.
400 The request was unsuccessful. The request was invalid or information is missing.
401 The request has not succeeded because the user authentication was incorrect.
403 The request has not succeeded because the user does not have the right permissions.