List domain redirects
GET /api/v2/domains/{id}/redirects
Lists the URL redirects on the domain, the limit per domain and whether another one can be created. Redirects are not DNS records. Create and change them through the redirect endpoints. A redirect only works while the domain uses Hostup’s nameservers. A rule shows status: "pending_dns" until then and while the DNS zone is being activated. When the caller also has write:domains, this read tries to repair rules with status: "error". Hostnames in the URLs are returned in Unicode form.
Authentication: An API key with the scope read:domains. Also write:domains: only for the automatic repair of rules with status: "error" during this read. Without it the list is returned unrepaired. About keys and scopes
Request
Path parameters
idstringrequireddom_…).Query parameters
includestringorphans adds orphanedProxyRules: active redirect rules on the domain that have no saved redirect. One of orphans.Example
curl "https://cloud.hostup.se/api/v2/domains/dom_01hxa3b4c5d6e7f8g9h0j1k2m3/redirects" \ -H "Authorization: Bearer $HOSTUP_API_KEY"Responses
200 The redirects, the limit per domain and whether another one can be created.
{ "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3", "rules": [ { "id": "redir_01hxa3b4c5d6e7f8g9h0j1k2m3", "domainId": "dom_01hxa3b4c5d6e7f8g9h0j1k2m3", "sourceHost": "www.example.com", "sourcePath": null, "sourceUrl": "https://www.example.com", "targetUrl": "https://example.com", "httpStatusCode": 301, "scope": "exact", "includeSubpaths": false, "preservePath": false, "preserveQuery": false, "includeSubdomains": false, "status": "active", "reason": null, "description": "Redirect www to apex", "createdAt": "2026-04-27T12:00:00.000Z", "updatedAt": "2026-04-27T12:00:00.000Z" } ], "limitPerDomain": 10, "redirectCount": 1, "actions": { "canCreateNewRule": { "allowed": true, "reason": null } }}Response fields
domainIdstringrulesarray of objectidstringdomainIdstringsourceHoststringsourcePathstring or nullsourceUrlstringtargetUrlstringhttpStatusCodeinteger301, 302, 307, 308.scopestringexact, root_www, subdomains, all.includeSubpathsbooleanpreservePathbooleanincludeSubpaths.preserveQuerybooleanincludeSubdomainsbooleanstatusstringactive, pending_dns, error, disabled.reasonstring or nulldescriptionstring or nullcreatedAtstring or nullupdatedAtstring or nulllimitPerDomainintegerredirectCountintegeractionsobjectcanCreateNewRuleobjectallowedbooleanreasonstring or nullcodestring or nullorphanedProxyRulesarray of objectinclude=orphans.Errors
Errors are Problem Details with a stable code. Branch on the code, not on the text.
| 400 | Invalid request. The response body is an RFC 7807 Problem Details document. |
| 401 | Unauthorized. Authentication is required. |
| 403 | Forbidden. The caller lacks a required scope or does not own the resource. |
| 404 | Not found. The resource does not exist or is not owned by the caller; code is domain_not_found. |
| 429 | Rate limited. Retry after the limit resets. 429 responses include Retry-After seconds plus X-RateLimit-* headers. |
| 500 | Internal error. Retry later or contact support if the issue persists. |