Domain Redirect

/domain-redirect

POST

Redirect a (sub-)domain.

JSON request

domain string The domain ID you wish to create the redirect for.
hostname string The hostname to redirect. Can be a subdomain, ex. sub.domain.tld.
location string The URL to redirect the hostname to.
type string One of ‘permanent’, ‘temporary, ‘frameset’.
is_original_path_forwarded string Keep everything after the hostname when forwarding.
title string The title to be used for frameset redirects.
description string The meta description to be used for frameset redirects.
favicon string The favicon URL to be used for frameset redirects.

JSON response

Possible errors

Sample

curl \
--request POST \
--user "{{api_username}}:{{api_key}}" \
--data '
    {
        "domain": "dc51e913-0a23-4b9f-9fe5-4fe5bc011cec",
        "hostname": "mydomain.com",
        "location": "http://google.com/",
        "type": "permanent"
    }
' \
"{{api_base_url}}/domain-redirect" | python -m json.tool

/domain-redirect/{id}

DELETE

Delete a previously created redirect.

Possible errors

Sample

curl \
--request DELETE \
--user "{{api_username}}:{{api_key}}" \
"{{api_base_url}}/domain-redirect/{id}" | python -m json.tool