Free & privacy-aware domain forwarder https://hosterra.eu/projects/public/forwarder.php
  • JavaScript 100%
Find a file
2026-04-25 18:59:30 +02:00
src Reverts dependencies changes 2026-04-25 18:43:08 +02:00
.env.example Changes redirection for blacklisted domains 2023-12-21 09:35:54 +01:00
.gitattributes Initial fork commit 2023-12-12 19:45:36 +01:00
app.js Rollback modifications 2023-12-13 19:56:39 +01:00
CHANGELOG.md Updates content. 2023-12-21 10:17:40 +01:00
index.js Removes comments 2023-12-13 20:04:49 +01:00
LICENSE Updates copyrights portions 2023-12-13 19:36:55 +01:00
package.json Fixes dependencies versions. 2026-04-25 18:59:30 +02:00
README.md Fixes commit signature issues. 2024-03-09 12:00:07 +01:00

Domain Forward

The service to forward domains using HTTP(s) redirects via Hosterra DoH.

Example scenarios:

  • Forward non-www to www domains or vice versa
  • Forward old domains to new domains
  • Forward "parked" domains to a bid platform
  • Forward you own domain to your LinkedIn page

How does it works?

  • Point your domain to Hosterra using CNAME or A/AAAA records
  • Tell us where to forward using TXT records
  • We handle redirection and HTTPS certificates for you

Get Started

To forward from www.old.com to old.com, add these records to your DNS:

www.old.com.            IN    CNAME   fwd.hosterra.tech
_forward.www.old.com.   IN    TXT     forward-to=https://old.com/*

Because CNAME can't be used in apex domains, you can use A/AAAA records. To forward from old.com to new.net, add these records to your DNS:

old.com.            IN    A       51.159.188.120
old.com.            IN    AAAA    2001:bc8:1210:656:dc00:ff:fe26:bfdd
_forward.old.com.   IN    TXT     forward-to=https://new.net/*

The star * at the end tells us that the remaining URL path is also forwarded to the destination URL. If you want to forward to a unique url, just omit this star.

If you use Cloudflare or any DNS which supports CNAME Flattening, you still can use CNAME records pointing to fwd.hosterra.tech. It is recommended to use CNAME records rather than A/AAAA records.

You can choose the type of redirection you want to use by declaring the http-status value:

www.old.com.            IN    CNAME   fwd.hosterra.tech
_forward.www.old.com.   IN    TXT     http-status=302;forward-to=https://new.com/*

HTTP status codes 301, 302, 303, 307 and 308 are supported. By default it's 301, which is permanent redirection.

Credits

This software is based on the invaluable work from Wildan M and BYU Internet Measurement and Anti-Abuse Lab. Endless thanks to them and all the contributors to these two projects.