Next.js Discord

Discord Forum

DNS config w railyway and cloudflare

Unanswered
Western paper wasp posted this in #help-forum
Open in Discord
Western paper waspOP
Yoo I'm trying to deploy my frontend on vercel, with my backend on railway which was linked with cloudflare dns but my vercel domain says invalid configuration

57 Replies

Western paper waspOP
can anyone take a look at this
Western paper waspOP
..
Western paper waspOP
@Clown yoo do happen to know this
Dont change the nameservers
Go with the A record
@Clown Go with the A record
Western paper waspOP
from vercel
from railway support the guy told me to get nameservers from cloudflare
@Western paper wasp from vercel
Railway will use its own configuration and vercel its own
So go with the A Record/CName records and add them to Cloudflare DNS Records
What does it say?
Western paper waspOP
I did this
get*
Vercel still says invalid?
Did you add the A record too?
@Clown Vercel still says invalid?
Western paper waspOP
no thats from cloudflare
@Western paper wasp no thats from cloudflare
Ik that picture is from Cf
@Clown Vercel still says invalid?
Western paper waspOP
yess
Im asking if vercel still says invalid
Western paper waspOP
Ohh
Railway is your backend
So i recommend you go with something like
api.framingzone.xyz
And for your frontend you can use your apex domain
@Clown Railway is your backend
Western paper waspOP
Yes
@Clown So i recommend you go with something like api.framingzone.xyz
Western paper waspOP
how do we do it tho
@Clown Railway is your backend
Western paper waspOP
why, is it like not good?
Edit the CName record in CF and set the name to api
@Western paper wasp why, is it like not good?
Nah, the thing is, you are trying to set 2 different things to the same domain.
Western paper waspOP
theres no api in this drop down
do we've any better alternatives
what do you use tho
@Western paper wasp Click to see attachment
Its not a problem with what you are using. Its a simple technical problem. How are would you differentiate if a call to framingzone is being done to the frontend or the backend?

Thats why you need separate domains/subdomains for both.

Just change this record's name to api.framingzone.xyz
Then you can create another new CName record with "@" as the name and set the value with whatever vercel tells you to use.
You dont need a alternative just go with this
Western paper waspOP
like this?
Yes
Western paper waspOP
yoo
it worked
lessgoo
but still deploying without errors
but it said vaild config
@Western paper wasp Click to see attachment
You need to add that A record aswell if you didnt already.
@Clown You need to add that A record aswell if you didnt already.
Western paper waspOP
I did
I had a question
how these open source projects like idk not exactly opensource but like kissanime, even 9anime like any streaming websites or gaming sites of any other entertaniment sites which dont charge for a sub? how do they deploy?

like don't they have to pay for huge traffics?
They use ads for income
@Clown They use ads for income
Western paper waspOP
but how to they run these services bro like they needs dbs to host
usually i don't see any traditional dbs around these
what would their tech stack be