Please refer to redirect.name for documentation.
holic / redirect.name Goto Github PK
View Code? Open in Web Editor NEWSimple DNS-based redirection service
Home Page: http://redirect.name/
License: MIT License
Simple DNS-based redirection service
Home Page: http://redirect.name/
License: MIT License
Please refer to redirect.name for documentation.
As suggested on Hacker News, it might be wise to put the TXT records used for configuring redirects on a separate hostname, e.g. _redirect.some.hostname.com
. This would prevent polluting the actual hostname and allow the use of CNAME records on subdomains (instead of A/ALIAS).
I stumbled over the fact that "Redirects to URL" must be in a single string whereas "Redirects" "to" "URL" doesn't work.
As some DNS providers create multi string TXT records it would help to support both styles.
Maybe this is also a bug/behavior of net.LookupTXT
and would require using it differently or using a different resolver library.
Email form from the website redirects to a mailchimp 404 page.
Trying to work out what I got wrong with the instructions on redirect.name:
Here's how I set up my redirect in CloudFlare:
Here's a exported file from CloudFlare
;; TXT Records
_redirect.booyaa.booyaa.wtf. 300 IN TXT "Redirects to http://booyaa.org"
;; CNAME Records
booyaa.booyaa.wtf. 300 IN CNAME alias.redirect.name.
Currently for correct redirecting on both www.example.org and example.org two _redirect TXT recods needed.
It will be cool to remove "www." from resolved TXT record.
To be backwards compatible two resolves can be done - if no _redirect.www.example.org record found - search for _redirect.example.org also.
I've been looking for an excuse to dive into Go and this would be a good project to learn and evaluate the speed/performance of OpenResty vs. basic HTTP server in Go.
freenom.com doesn't accept txt records that start with _
I used a template from the GitHub Pages generator to get some basic docs up and running quickly, but they could be vastly improved.
One disadvantage of not requiring sign-ups is I have no way to get in touch with the users of this service. If the IP address or TXT formatting needs to change for whatever reason, there would be no way to communicate this with users. An optional subscribe form on the docs site would be handy for keeping in touch with users.
This RFC describes TXT
records with the following format:
<owner> <class> <ttl> TXT "<attribute name>=<attribute value>"
This is how I decided to go with redirect.name=...
for the TXT
record format for this service. However, I'm seeing some services not following the RFC, specifically DNSimple's ALIAS
record, which adds a TXT
record with value ALIAS for alias.redirect.name
.
If it's not really necessary to follow this RFC, maybe a more generic, human readable format would be ideal? Something like:
Redirects to https://github.com/holic
Redirects permanently to https://github.com/holic
Redirects from /github to https://github.com/holic/redirect.name
Redirects permanently from /* to https://github.com/holic/*
I'm not sure if this is beyond the goals of this project, but how about supporting redirecting other http methods?
For (a rather silly) example, if I have the following:
thing-service.mydomain.com IN CNAME alias.redirect.name
_redirect.things-service.mydomain.com IN TXT Redirect from /* to https://my-app.herokuapp.com/*
I'd like POST thing-service.mydomain.com/things
to be forwarded to https://my-app.herokuapp.com/things
with the same post body. Using a status code of 307 when redirecting should do the trick - I can put up a pull request, but I just first wanted to make sure it aligned with this project's goals.
@holic fantastic tool, thanks. The power:simplicity here is wonderful.
How do you feel about a PR to handle catch-all wildcards before the fallback
function?
e.g.
IN ALIAS alias.redirect.name ; domain apex using a non-standard record
_redirect IN TXT "Redirects permanently to https://example.com/*"
* IN CNAME alias.redirect.name
_redirect.* IN TXT "Redirects permanently to https://example.com/*"
My use-case is extremely lazily redirecting miss-spelled domain names. This functionality would allow for a standard set of records to be added for each without care to past or future sub-domain changes.
Currently this would be handled by defining a _redirect
TXT
record for every possible subdomain.
(Also, if it's relevant, I'm self hosting via the published docker image - swift and stateless is great)
Could we have redirections that are non-http(s)? I can thing of FTP but also perhaps other valid URIs schemas such as "magnet" or "e2k"?
If you agree I can send a PR myself :)
Load a local HTML page as a Go template?
Not really sure how to easily test the Lua code, but rewriting in Go would be a lot easier to test, assuming it's more performant.
I love your service!
Great idea and damn simple to use.
Is there any chance that https is supported as well?
As I see there is right now no https support enabled for the sld alias.redirect.name
Maybe it could be setup by using acme v2 wildcard certs from letsencrypt?
I love this service and I wouldn't mind donating (BTC or otherwise) a little to keep the servers running...
Cool project, thanks for sharing it! I came across and wanted to setup locally on my server but I see the code does not have a license. Would you consider adding one?
What I have:
@ A 45.55.72.95
_redirect TXT/SPF "Redirects permanently to https://www.mydomain.com"
but no luck :/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.