Domain Redirect¶
/domain-redirect¶
POST¶
Redirect a (sub-)domain.
JSON request
|
string |
The domain ID you wish to create the redirect for. |
|
string |
The hostname to redirect. Can be a subdomain, ex. sub.domain.tld. |
|
string |
The URL to redirect the hostname to. |
|
string |
One of ‘permanent’, ‘temporary, ‘frameset’. |
|
string |
Keep everything after the hostname when forwarding. |
|
string |
The title to be used for frameset redirects. |
|
string |
The meta description to be used for frameset redirects. |
|
string |
The favicon URL to be used for frameset redirects. |
JSON response
object: Domain Redirect
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