I’m working on a little hobby project that redirects to different URLs based on preconfigured patterns. In summary, I want to redirect from something like:
To maximize ergonomy I wanted to set up my app to be able to handle connections from machines that are using search domain
example.com, so users can type
go/buzzword/hyper-app/pull/153 in their browers and be redirected to the example above.
So, I’ve been struggling to figure out if, and how, is it possible to configure routing like in some easy way? I guess setting
nginx reverse proxy with manual TLS termination would work, but I am wondering if it’s possible to achieve the same effect using automatic HTTPS connection upgrade and TLS handling provided by Fly?
Ahh, here’s a struggle I know well (I’ve set up a link shortener at multiple previous companies )
For a variety of reasons, I gave up on search domains & instead provided folks the browser-specific instructions to add a custom search provider (example chrome instructions). So usage would be “Type
go <space> keyword in the nav bar”.
Challenges to using search domains:
- Breaks if your user’s DNS changes (e.g. leave intranet, aggressive home router, etc). This was frequent.
- Things that auto-linkify (like google docs, slack, etc) won’t always recognize or linkify a non-fqdn link
- Browsers won’t forward a fqdn as http HOST (basically the dns resolution of
go -> go.yourcompany.com happens outside of what it knows), so yeah, your load balancer etc is gonna be confused.
- TLS will fail (CN
go != go.yourcompany.com)
…and maybe some other stuff I’m forgetting.
Consider also just buying a cheap short domain name. Here’s a specialist registrar for it (no affiliation!).
Thanks mikey! I guess I’ll go with search provider then. The same day I’ve read your reply we’ve started having TLS issues with my company’s link shortener, so yeah…