Back to top
Hosted TXTDirect

Get started with our hosted TXTDirect instance

Start testing

Upgrade to a plan that fits your needs later
Host redirect using CNAME

about.txtdirect.org

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your redirect
www.txtdirect.org             86000 IN CNAME   txtd.io.
_redirect.www.txtdirect.org   86000 IN TXT     "v=txtv0;type=host;to=https://about.txtdirect.org"

Options

to= sets the URL to redirect to
code= can change the redirect code used such as 301 or 302

about.txtdirect.org

Host redirect on root record

txtdirect.org

about.txtdirect.org

  • Point your chosen root A-record to 45.85.238.5
  • Point your chosen root AAAA-record to 2a0e:c885:5::1
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your redirect
txtdirect.org             86000 IN A       45.85.238.5
txtdirect.org             86000 IN AAAA    2a0e:c885:5::1
_redirect.txtdirect.org   86000 IN TXT     "v=txtv0;type=host;to=https://about.txtdirect.org"

Options

to= sets the URL to redirect to
code= can change the redirect code used such as 301 or 302

txtdirect.org

about.txtdirect.org

Host redirect to www subdomain

txtdirect.org

  • Point your chosen root A-record to 45.85.238.5
  • Point your chosen root AAAA-record to 2a0e:c885:5::1

txtdirect.org

Path redirect (shortener)

s.txtdirect.org/hosted

about.txtdirect.org/hosted

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your redirect
s.txtdirect.org                    86000 IN CNAME   txtd.io.
_redirect.s.txtdirect.org          86400 IN TXT     "v=txtv0;type=path;root=https://about.txtdirect.org;to=https://about.txtdirect.org"

_redirect.hosted.s.txtdirect.org   86400 IN TXT     "v=txtv0;type=host;code=302;to=https://about.txtdirect.org/hosted"

Path redirect uses two different types.
The path record configures an endpoint to use path based routing. Specific host records are then used for the redirects.

By default requesting example.com/firstMatch/secondMatch looks up _redirect.secondmatch.firstmatch.example.com.

In the case a specific record is not provided it will use wildcards.
Ordered from most specific to least specific such as:

_redirect.secondmatch.firstmatch.example.com
_redirect._.firstmatch.example.com
_redirect._._.example.com

Options

path

to= sets the fallback URL, if no specific path subdomain is matched
root= sets the fallback URL, when the root path is requested

host

to= sets the URL to redirect to
code= can change the redirect code used such as 301 or 302

s.txtdirect.org/hosted

about.txtdirect.org/hosted

Path redirect with custom order

s.txtdirect.org/v2/docs/

docs.txtdirect.org/v2

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your redirect
s.txtdirect.org                 86000 IN CNAME   txtd.io.
_redirect.s.txtdirect.org       86400 IN TXT     "v=txtv0;type=path;from=/$2/$1/;to=https://about.txtdirect.org;root=https://about.txtdirect.org"

_redirect.v2.docs.s.txtdirect.org   86400 IN TXT     "v=txtv0;type=host;code=302;to=https://docs.txtdirect.org/v2"

_redirect._._.s.txtdirect.org   86400 IN TXT     "v=txtv0;type=host;code=302;to=https://about.txtdirect.org/hosted"

Instead of the default lookup order TXTDirect allows a custom order to be set using the from. Using /$2/$1 would reverse the default order.

Options

path

to= sets the fallback URL, if no specific path subdomain is matched
root= sets the fallback URL, when the root path is requested from= enables reordering such as /$2/$1/

host

to= sets the URL to redirect to
code= can change the redirect code used such as 301 or 302

s.txtdirect.org/v2/docs/

docs.txtdirect.org/v2

Container vanity url for a specific container

c.txtdirect.org/txtdirect:dev-3fd9be

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your vanity url
c.txtdirect.org                    86000 IN CNAME   docker.txtd.io.
_redirect.c.txtdirect.org          86400 IN TXT     "v=txtv0;type=dockerv2;to=https://gcr.io/txtdirect-223710/txtdirect"

Options

to= sets the backend URL for the registry/container
website= (non container traffic) sets the general fallback URL
root= (non container traffic) sets the fallback URL, when the root path is requested

c.txtdirect.org/txtdirect:dev-3fd9be

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be

Container vanity url for a specific tag

c.txtdirect.org/txtdirect

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your vanity url
c.txtdirect.org                    86000 IN CNAME   docker.txtd.io.
_redirect.c.txtdirect.org          86400 IN TXT     "v=txtv0;type=dockerv2;to=https://gcr.io/txtdirect-223710/txtdirect:dev-3fd9be"

Options

to= sets the backend URL for the registry/container
website= (non container traffic) sets the general fallback URL
root= (non container traffic) sets the fallback URL, when the root path is requested

c.txtdirect.org/txtdirect

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be

Container vanity url for a full platform

c.txtdirect.org/txtdirect-223710/txtdirect:dev-3fd9be

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be

  • Point your chosen subdomain CNAME to txtd.io.
  • Create a TXT record with the subdomain _redirect
  • Use the open TXTDirect spec to configure your vanity url
c.txtdirect.org                    86000 IN CNAME   docker.txtd.io.
_redirect.c.txtdirect.org          86400 IN TXT     "v=txtv0;type=dockerv2;to=https://gcr.io"

Options

to= sets the backend URL for the registry/container
website= (non container traffic) sets the general fallback URL
root= (non container traffic) sets the fallback URL, when the root path is requested

c.txtdirect.org/txtdirect-223710/txtdirect:dev-3fd9be

gcr.io/txtdirect-223710/txtdirect:dev-3fd9be