Confused why I cant see my website?
sydneypatel
HOBBYOP

6 months ago

I can see it configured on both Railway and Cloudfare, so I'm confused as to what the problem is?

$10 Bounty

23 Replies

Railway
BOT

6 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


6 months ago

Hey, can you try to remove the domain from your service, delete the CNAME record and readd your domain to your Railway service?


6 months ago

I had a similar problem, I disabled the cloud flare proxy and it worked.


mardonedias

I had a similar problem, I disabled the cloud flare proxy and it worked.

sydneypatel
HOBBYOP

6 months ago

Which one do you disable


sydneypatel

Which one do you disable

6 months ago

disable the 2, domains and the www, then you can test if it works


6 months ago

I don't see any deploys in that linked resource?


Status changed to Awaiting User Response Railway 6 months ago


jake

I don't see any deploys in that linked resource?

sydneypatel
HOBBYOP

6 months ago

What do you mean?


Status changed to Awaiting Railway Response Railway 6 months ago


sydneypatel

What do you mean?

sydneypatel
HOBBYOP

6 months ago

Nevermind, I forgot to redeploy! I can see the site now thnak you !!


sydneypatel
HOBBYOP

6 months ago

I am sturggling tho when I am on a different route like website.com/about, and I reload, it says "Cannot GET /about"


case
PRO

6 months ago

@sydneypatel you'll need to share more details about your website's deployment - e.g. is it a static site, a webapp, if a webapp, which framework, what's the build process, etc.

We can't debug HTTP issues like this without more information. Also, what is the HTTP error code you're seeing for Cannot GET /about - is it a 404, or something else?


case

@sydneypatel you'll need to share more details about your website's deployment - e.g. is it a static site, a webapp, if a webapp, which framework, what's the build process, etc.We can't debug HTTP issues like this without more information. Also, what is the HTTP error code you're seeing for Cannot GET /about - is it a 404, or something else?

sydneypatel
HOBBYOP

6 months ago

  • Type: Web app (SPA)

  • Frontend: React + Vite (dev server on localhost:5173)

  • Routing: React Router (client-side History API)

  • Backend/API: Node.js + Express (e.g., localhost:8080)

  • Database: MongoDB (Mongoose)

  • Dev setup: Two servers

    • Vite serves the SPA and proxies API/static to the backend

    • Example Vite proxy: '/api' and '/uploads'http://localhost:8080

  • Build process:

    • frontend: vite build → outputs /dist

    • backend: plain Node/Express; in prod we serve the built SPA (or use Nginx)

    • custom build command: npm install --prefix frontend && npm run build --prefix frontend && npm install --prefix backend

      Error message: Failed to load resource: the server responded with a status of 404 ()


case
PRO

6 months ago

Does the /about view work in your local environment / server? And it's just failing in Railway? Or does it not work locally either?


sydneypatel
HOBBYOP

6 months ago

I was able to get it to work. Now I am jsut having an issue where my page contents are no longer appearing but trying to figure that out. I am thinking it may be something to do with my frontend still pointing at the Railway host


pasiekak
PRO

6 months ago

Does your app still return a 404 when you reload a non-base path like /about or /products?

If you're serving the frontend through Express, you need to add a catch-all route

so that unknown (from the server’s perspective) routes are redirected to React Router.
https://medium.com/%40marwan.zaarab/deploying-a-react-app-with-multiple-routes-using-express-static-files-e3373c53fe94

I’d also recommend deploying frontend and backend as separate Railway services.

This way, you can manage them independently and avoid coupling your static build with the API.

Please, answer with more details about your deploy process, maybe i could help


pasiekak

Does your app still return a 404 when you reload a non-base path like /about or /products?If you're serving the frontend through Express, you need to add a catch-all routeso that unknown (from the server’s perspective) routes are redirected to React Router.https://medium.com/%40marwan.zaarab/deploying-a-react-app-with-multiple-routes-using-express-static-files-e3373c53fe94I’d also recommend deploying frontend and backend as separate Railway services.This way, you can manage them independently and avoid coupling your static build with the API.Please, answer with more details about your deploy process, maybe i could help

sydneypatel
HOBBYOP

6 months ago

Yes I added a catch-all route. Now, I am just missing a lot of the data form those pages


pasiekak
PRO

6 months ago

Can you share your browser devtools > network tab?


irazvan2745
FREE

6 months ago

Hey, is the domain pointing correctly?


irazvan2745
FREE

6 months ago

the website loads fine for me


irazvan2745

the website loads fine for me

sydneypatel
HOBBYOP

6 months ago

Yes the domain is poointing correctly


pasiekak

Can you share your browser devtools > network tab?

sydneypatel
HOBBYOP

6 months ago

This is the devtools for the portfolio page

Attachments


sydneypatel

This is the devtools for the portfolio page

sydneypatel
HOBBYOP

6 months ago

expanded

Attachments


sydneypatel

expanded

pasiekak
PRO

6 months ago

I noticed you're requesting http://localhost:8080/api/portfolio and it shouldn't happen on production, change api address to correct one, maybe you just forgot to change some .env variable ;)


pasiekak

I noticed you're requesting http://localhost:8080/api/portfolio and it shouldn't happen on production, change api address to correct one, maybe you just forgot to change some .env variable ;)

sydneypatel
HOBBYOP

6 months ago

What would be a correct API variable? and wdym by changing an .env variable?? which one

thanks for your response!


Loading...