Domain redirect to user page

My users have profile page, and visitors can visit their page via webapp.com/username. I want users to use their domain, and visitors to visit directly user's domain URL, not webapp.com/username. I know a choice that is permament redirect, but URL is changed if I do this one. I want base url to be like DNS. nobody should know the base url, like cloudflare (projectname.pages.dev).
6 Replies
crossbeau
crossbeau16mo ago
Redirect · Cloudflare Workers docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
crossbeau
crossbeau16mo ago
Or depending on your frontend code maybe a redirects file if supported
kordexa
kordexaOP16mo ago
this is like permament redirect. I use Next.js. I have no idea how to do this.
crossbeau
crossbeau16mo ago
If you are running on cloudfare pages - https://developers.cloudflare.com/pages/platform/redirects
Redirects · Cloudflare Pages docs
To use redirects on Cloudflare Pages, declare your redirects in a plain text file called _redirects without a file extension, in the output folder of …
kordexa
kordexaOP16mo ago
Yes, Pages. I am investigating this one I guess I found correct way: Clouflare for SaaS: Custom Hostnames
crossbeau
crossbeau16mo ago
Thats cool
Want results from more Discord servers?
Add your server