Forward subdomain to tg://

Hi!

Is it possible to make redirections to non http(s) resources?
I want redirect to my telegram account.

Thanks in advance.

Sorry, URL Forwarding will only accept HTTP/S or just plain /.

Thank you, @sdayman, for your answer.
But it’s possible! I solved it with workers! It’s awesome!

addEventListener('fetch', async event => {
    event.respondWith(handleRequest(event.request))
})
const someURLToRedirectTo = 'tg://resolve?domain=<USERNAME>'
const code = 301
async function handleRequest(request) {
    return Response.redirect(someURLToRedirectTo, code)
}

Than I added CNAME record with proxing. As I understood, workers do not work without it.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.