Is a Caddy Module to create redirections based in a TXT record for a domain.
Using caddy allows to make https redirections activating the auto https.
To include in Caddy needs to recompile caddy including the module
$ xcaddy build --with github.com/argami/redir-dns@0174c1a
redir_dns [matcher]
Caddyfile Example:
{
order redir_dns after redir # Required
}
localhost {
redir_dns # if matcher
}
Yo need to create a TXT record for the domain with _redirdns
value for example to redirect www.myhost.com to anotherhost.com your DNS config should be like:
CNAME www.arthomecarcasonne.fr. 1m00s "mycaddyhost.com."
TXT _redirdns.www.myhost.com. 1m00s "https://anotherhost.com"