“Cannot GET /”
The server is running, but Express found no route and no static file for the path, so it answered with its one-line default. On the homepage it usually means the built front-end isn't being served; on another path it means the route is missing or the server doesn't know to hand single-page-app routes to index.html.
Is your site showing it right now?
The free scan loads your page like a visitor and checks for this message, plus broken links, script errors and phone layout. It also walks your signup, booking or contact form, without sending anything.
Free, no signup. Usually done in about a minute.Why it happens
- The front-end build (dist or build folder) wasn't produced or deployed, so there's nothing to serve at /
- express.static points at the wrong folder, or the path differs between your machine and the server
- A single-page app: direct links to /about or /pricing reach the server, which has no route for them
- A route is defined with a different method (POST) or a different path (a trailing slash, a prefix)
- The wrong app is running on the port: an API-only server where the website should be
How to fix it
Check the build is there
On the server, confirm the folder you serve (often build/ or dist/) exists and has index.html. Run the build step in your deploy (npm run build) before starting the server.
Serve the static folder
Add app.use(express.static(path.join(__dirname, 'build'))) before your API routes, using path.join so it works on any machine.
Send unknown paths to index.html (single-page apps)
After the API routes, add app.get('*', (req, res) => res.sendFile(path.join(__dirname, 'build', 'index.html'))) so client-side routes load on a direct visit or refresh.
Check the route itself
For a specific path, confirm a handler exists for that method and path, including any router prefix (app.use('/api', router) makes /api/users, not /users).
Check which app the host runs
Look at the start command (package.json "start", Procfile or the host's settings): it must start the server that serves the site, on the port the host provides (process.env.PORT).
Questions
It works on my computer
Locally the dev server serves the front-end for you. On the server only Express runs, so it has to serve the built files itself, with the steps above.
"Cannot POST" instead
Same cause, for a form or API call: no handler for that method and path. Check the form's action and method against the routes.
Can Page Canary tell me if this comes back?
Yes. Page Canary checks your key pages every day for this message and others like it, confirms it on a second check, and emails you with the fix. One site is free.