R
Railway•7mo ago
yavuz

Do I need a custom domain for R2 CDN?

Project ID: dba6cd6e-5ea1-494c-b77f-81377e24fbde I have an API working here on railway. I am getting ready to move media files to CloudFlare R2. I now use Railway Generated domain for my API. I also have a purchased domain for the website of the full app. Full app is FastAPI backend and React Native front end. So, could I simply just use the subdomain auto-generated by Railway myapiservice.up.railway.app? Then I could may be add CNAME to CloudFlare for the auto generated subdomain? Or.. I have to point a subdomain of my purchased domain here to railway? myapiservice.mydomain.com and enter that as a custom domain in the networking section pf my API here? Or.. I just have to enter my full domain like mydomain.com and www.mydomain.com here as custom domain.
Solution:
You would have api.domain.com for your railway API service, and something like cdn.domain.com for your cloudflare R2 bucket
Jump to solution
5 Replies
Percy
Percy•7mo ago
Project ID: dba6cd6e-5ea1-494c-b77f-81377e24fbde
Solution
Brody
Brody•7mo ago
You would have api.domain.com for your railway API service, and something like cdn.domain.com for your cloudflare R2 bucket
yavuz
yavuzOP•7mo ago
So, if I understand correctly, I create a subdomain at A2 Hosting ( where I purchased my domain ) api.mydomain.com and create another subdomain cdn.mydomain.com and enter the api.mydomain.com to Network settings of my api as custom domain, and enter the cdn.mydomain.com to cloudflare to be cached. Is this correct?
Brody
Brody•7mo ago
correct
yavuz
yavuzOP•7mo ago
Thanks again 🙂
Want results from more Discord servers?
Add your server