Configure domain redirects and URL forwarding with a simple DNS record

View project onGitHub

No sign-up required. Just add a DNS record.

This simple redirection service has no database backend, so there's no need to sign up for anything. Everything is configured by DNS. Just point your domain to the service, add a DNS record to configure your redirect(s), and you're good to go.

Here's a live example redirecting to this project's GitHub repo:

github            IN  CNAME
_redirect.github  IN  TXT    "Redirects to"


  1. Point your domain or subdomain to the redirection service. For subdomains, this is done by setting up a CNAME record. For apex/naked domains, it is recommended that you use an ALIAS or ANAME record type if your DNS provider supports it. Otherwise, use a plain A record, keeping in mind that the IP address may change (or more may be added).
    • CNAME and ALIAS/ANAME records should point to
    • A records should point to
  2. Configure your redirect by adding a TXT record on the same hostname as the record above, prepended with _redirect.
    • For example, on the hostname github, your TXT record should be added to the _redirect.github hostname.
    • Your TXT record value should have a human-readable format format like one of the following:
      • Redirects to [target], where target is the target URL
      • Redirects from [path] to [target], where path is a path to match on the hostname
      • Redirects permanently to [target], where permanently redirects with a 301 status code (defaults to 302 otherwise)
    • As long as the TXT record starts with Redirect or Redirects and has a target, it does not matter the order of from [path], to [target], or the permanently flag.

You can add more than one TXT record per hostname. The first path matched will be used for the redirect. Multiple TXT records for the same matched path result in a round-robin effect.

Wildcard matches (*) are also supported.

Any unmatched paths will redirect to this documentation page, so it's recommended that you add a wildcard catch-all path when redirecting specific paths.


Redirects to redirects all paths on the hostname to with a 302 status code.

Redirects permanently to redirects exactly as above, except with a 301 status code.

Redirects from /github to redirects only the /github path on the hostname to the target URL.

Redirects from /* to* is a wildcard match that will redirect to the target URL, replacing the wildcards with the matched value.