Skip to content

Caddy module to redirect based on TXT dns record

Notifications You must be signed in to change notification settings

argami/redir-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Redir DNS

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.

How to use

To include in Caddy needs to recompile caddy including the module

$ xcaddy build --with github.com/argami/redir-dns@0174c1a
- Usage:

redir_dns [matcher]

Caddyfile Example:

{
  order redir_dns after redir # Required
}

localhost {
  redir_dns # if matcher
}
- DNS Configuration

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"

About

Caddy module to redirect based on TXT dns record

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages