NewSink: Short Links or Redirects on cloudflare with Multiple Domains
This post was translated from Chinese by AI. If anything reads oddly, the Chinese original is authoritative. 中文原文
Project repository: https://github.com/woodchen-ink/NewSink
Why I Customized It
I was using a 2H3G RN server running SafeLine + nginx to host a few static sites and handle redirects. I used nginx because SafeLine's redirects don't support paths.
Today, I needed to add another redirect, only to discover that the free version of SafeLine now only allows 10 sites!
I already had Sink deployed for some short-link redirects, so I wondered if I could modify it to support multiple domains. With cursor's help, I got it working.
Result

You need to bind the domain here and configure its DNS first

Deployment
Just follow the original deployment guide: fork my repository, then follow the official guide to deploy it to pages.
Since domains bound to a worker must have their DNS hosted on cloudflare, I use pages instead. This lets me use a cname to bind domains hosted on dnspod to this pages project too.
Things to Watch Out For
Make sure you don't exceed cloudflare's free usage limits for KV, D1, and other services.
Last updated 2025-06-17
Comments 0