Redirects
A redirect answers HTTP(S) requests for a host name in one of your zones with a redirect to another URL. Dinio adds the DNS records that point the name at its edge, and removes them with the redirect. See DNS hosting.
dinio redirect create go.example.com https://www.example.com/campaign --tls autodinio redirect show go.example.comdinio redirect list --zone example.comdinio redirect update go.example.com --location https://www.example.com/autumndinio redirect rm go.example.comA redirect is addressed by its host name: NAME is the full name, go.example.com.
Commands
Section titled “Commands”redirect create NAME LOCATION
Section titled “redirect create NAME LOCATION”| Option | |
|---|---|
--zone ZONE |
The zone the name is in. Default: the most specific of your zones that contains it. |
--code CODE |
301, 302, 303, 307 or 308. Default 302. |
--tls auto|manual|none |
Where the HTTPS certificate comes from. Default none. |
The CLI defaults to 302, a temporary redirect: browsers may cache 301 and 308 for a long
time, so a wrong permanent redirect is hard to take back. Pass --code 301 once you are sure.
The name must not have A, AAAA or CNAME records of your own — Dinio refuses rather than
overwrite them. Remove them first with record rm.
redirect show NAME
Section titled “redirect show NAME”The redirect, and for --tls auto its certificate: status (Pending, Valid, Failed),
the certificate’s uuid, when Dinio next acts on it, and the last error.
redirect list [--zone ZONE]
Section titled “redirect list [--zone ZONE]”Redirects of every zone you can access, or of one zone: name, code, location, TLS mode and zone.
redirect update NAME
Section titled “redirect update NAME”Any of --location URL, --code CODE, --tls auto|manual|none. The name and its DNS records
stay.
redirect rm NAME
Section titled “redirect rm NAME”Deletes the redirect with its DNS records and automatic certificate. Asks for confirmation.
Certificates
Section titled “Certificates”--tls |
|
|---|---|
auto |
Dinio issues a Let’s Encrypt certificate and renews it. Follow it with redirect show until it is Valid. |
manual |
Upload your own with dinio cert add. |
none |
No certificate of its own; HTTPS gets the platform’s default certificate. |
To move a name from an automatic certificate to your own, switch the redirect first, then upload:
dinio redirect update go.example.com --tls manualdinio cert add --zone example.com fullchain.pem privkey.pem