Skip to content

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.

Terminal window
dinio redirect create go.example.com https://www.example.com/campaign --tls auto
dinio redirect show go.example.com
dinio redirect list --zone example.com
dinio redirect update go.example.com --location https://www.example.com/autumn
dinio redirect rm go.example.com

A redirect is addressed by its host name: NAME is the full name, go.example.com.

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.

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.

Redirects of every zone you can access, or of one zone: name, code, location, TLS mode and zone.

Any of --location URL, --code CODE, --tls auto|manual|none. The name and its DNS records stay.

Deletes the redirect with its DNS records and automatic certificate. Asks for confirmation.

--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:

Terminal window
dinio redirect update go.example.com --tls manual
dinio cert add --zone example.com fullchain.pem privkey.pem