Debugging 404 Errors

Sometimes things don’t go as expected when deploying a website. If you see a 404 on your site, that means the page or resource couldn’t be found.

There are many possible causes, and the absence of something can be tricky debug if you don’t know where to look. Here are some things you can do to find the cause and fix it.

Debugging Tips


Check the error code

If you see a mostly white screen with 404: NOT_FOUND along with a Code and and ID then you can click the blue info box below the error details to find an explanation of the error and some tips to help you solve it.

The error code’s documentation explains the scenarios in which that problem may occur. It also has a set of troubleshooting steps specific to that problem.

Check that the deployment exists

It’s a good idea to check the deployment URL for typos or incorrect paths. This is especially true when accessing specific deployments using Generated URLs which contain a unique hash.

You should review the deployment list from your project dashboard to make sure that (1) the deployment was successful, (2) the deployment was not deleted, and (3) the URL you’re visiting is the correct one for that deployment.

If the deployment exists, review the deployment logs for issues that might have caused the deployment to be unavailable. If there are uncaught errors in a function or component, those could bubble up and cause you to see a 404 error. In this case a try/catch statement can help.

Check the deployment output

The build output might be different from what you expect. You can check it by navigating to the deployment’s details page on your project dashboard. From there, you can go over to the Source tab to check both the Source and Output for that deployment.

Make sure the file your framework uses as the homepage is present. For many projects this should be an index.html file at the root level of the deployment output.

Be careful of capitalization. If the project has a capitalized Index.html you should change it to lowercase index.html and try a new deployment with that change.

If the project uses a traditionally server-side framework, such as Express, you should make sure to put the index.js file in a /api directory so it will be deployed as a serverless function. In that case the path to the first page of your site would look like my-website.com/api which can be altered to use the root path / using rewrites. More specific Express project patterns and troubleshooting tips are covered in Express 101: Everything about deploying your Express app on Vercel.

Check the project configuration

If you find that the build output doesn’t match what you expect, the difference may have been caused by build settings or other project configuration. You can use the CLI to test a build on your local computer with the vercel build command. That can help you test configuration changes without creating a new deployment for each change.

If you’re using a framework, such as Next.js, then you can usually rely on the corresponding Framework Preset in the project’s Build and Development Settings. If any of the commands have overrides, that could be the source of the problem.

The Output Directory is often overlooked but can have a big effect on the deployment. Only the contents of this directory are statically served as part of your deployment, so it’s important that the correct value is used for this setting.

Check the Build and Development Settings and Root Directory carefully to make sure they’re correct for your project.

If the project is part of a monorepo, you’ll also want to check that the root directory is set correctly. An incorrect root directory value would definitely cause unexpected deployment output.

Configuration files within a project are also good to check. If the project uses a vercel.json file for configuration, such as setting path rewrites or scheduling cron jobs, it’s possible that something in the config file caused the 404.

Some frameworks or packages use their own routing method that requires all requests to go through one specific path. This is often seen with SPA projects, Express projects, and other projects using similar architecture. You can solve it using rewrites to direct traffic through the router.

React Router example:

{ "rewrites": [{"source": "/(.*)", "destination": "/"}]  }

Express.js example:

{ "rewrites": [{ "source": "/(.*)", "destination": "/api" }] }

Many frameworks use their own configuration files to set redirects, rewrites, runtimes, and other values. It’s worth checking the documentation for your framework to verify that the repo is configured correctly for serverless deployment with Vercel.

Check the domain configuration

If something is wrong with the domain configuration, that could cause a 404 error.

You can check the domain settings within project settings to make sure the domain is added to the project and it has a verified Valid Configuration status. Any detectable invalid configuration will be flagged with a description of what is missing.

Sometimes the solution to a domain configuration issue is not obvious. The domain troubleshooting doc describes domain, DNS, and SSL debugging steps.

Check your access role and permissions

If you’re on a team with multiple people, you may have run into a permissions issue. Check that you are allowed to access the deployment by your role and project settings.

If your team uses Trusted IPs to restrict deployment access, then you’ll get a 404 error if you attempt to visit from an IP address that is not specifically allowed.

You should ask the team owner to check your access group and the project’s deployment protection settings to help you get the deployment access you need.

Practical Applications


  • Someone reached out about a 404 error on the homepage of their static site.
  • We looked into the deployment output and found that the deployment was successful and pages were available, but there was no index.html in the output. Paths like example.com/about were working fine, but example.com/ was returning a 404.
  • The homepage / path worked as expected after switching the name of main.html to index.html with a new deployment.
  • A community member asked for help with a 404 error. The code was DEPLOYMENT_NOT_FOUND so we determined that either the URL was wrong or the deployment was deleted.
  • Upon reviewing the deployment list and checking with their team, it was discovered that another team member had deleted the deployment. Switching to the URL of a more recent deployment allowed them to continue their work.

Resources


3 Likes
404: NOT_FOUND Code: NOT_FOUND
Express 101: Everything about deploying your Express app on Vercel
Error 404 PAGE NOT FOUND
Totally noob looking for help!
404 for edge dynamic routes
I get 404 page after deployment
404: NOT FOUND but serverless backend and frontend work well locally
Vercel Nextjs Googlebot soft 404 issues
Hydration/rendering fails after resume – raw RSC flight data?
404 Error when deploying
Deployed Next.js site shows 404 despite successful build
Vercel integration is giving 404
404 Error when deploying
DNS configuration
Error 404 on my Vanilla web app (no frameworks, only NodeJS)
404 after redeploy with same commit
Next.js Endpoint compiles then returns 404
Persistent path-to-regexp error with valid rewrites
Basic API's doesn't work with Vercel :(
Go functions don't seem to work correctly for wildcard routes
Error 404 page when deploying
Alternate Runtime for Serverless Function Issues
Vercel serverless functions not being correctly routed
404: not_found
404 Error but Works Fine Locally
404: NOT_FOUND Code: NOT_FOUND ID: iad1:iad1::bwbst-1732155841167-d75fd6006841
Can't run "vercel dev" with python backend
404 Error for APi after deployment
My application's authentication flow
Would need help to set up a mystmd project
Doomed to be stuck in local development mode
Serverless Function to backend - NOT FOUND
Static assets
Error 404 after adding nodejs backend
404 not_found
Deploying a Flask app with Vercel
News Cache [2024-08-12]
404 error app/api/user/route.ts with mongodb
DNS issues and pages not loading
Deploying an .ejs-expressjs-tailwindcss app: 404 NOT FOUND
Deploying svelte kit with flask as backend in one single project
App works on my localhost, but not on Vercel?
MERN Stack Repo Deployment
My project blog works fine locally but pages that resolve locally result in a 404 on vercel
Clerk webhooks fail with a 404 error
Not_found 404
Platforms Starter Kit - 404 homepage and login issue
Project Break
URGENT: Keep getting random 404 errors on page load. When refreshing page loads normally
404 Not Found
Can't Deploy properly NestJS Service
News Cache [2024-09-07]
Inconsistent draft mode behaviour when deployed to Vercel - some paths get 404 without hitting server, others work as expected
Auth/providers works in localhost but 404s in prod
Error when building my remix app
I keep getting 404 errors
Nuxt.js Routing Issue on Vercel: Redirects to Homepage or 404 Error
How to fix the 5klq link
Constantly getting 404 page on deployment
Custom 403 page?
404 appears on some pages of Hexo
I think i got blocked from v0
Depoyment error
Subject: 404 NOT FOUND Error on Deployment
I cannot deploy the app with flask with 404 error code
"vercel dev" works, but in "vercel" it doesn't work
Https://mootree.vercel.app/
Having trouble deploying Flask App on vercel
Newbie help: Deploying on Vercel and assigning to domain name
Vercel isn't showing code, not HTML
Telegram Bot Not Responding Despite No Error Logs - Webhook Configured
404: NOT_FOUND Code: NOT_FOUND
Error website 404 not found
I am facing error when I deploy a website, my backend is running on google cloud, can anyone help me, 404: NOT_FOUND Code: NOT_FOUND ID: lhr1:lhr1::rdhwn-1729157608187-c6de570a9a16
React Routes issues
404 NOT_FOUND for simple HTML & CSS site
Issue with Rewrite Configuration on Vercel Leading to 404 Errors for Sub-Pages
404: NOT_FOUND Code: NOT_FOUND
Getting 404 Error on deployment, trying to troubleshoot issue. I used Django
Custom Python package build errors
Getting 404 error
Getting 404 error
NestJS deployment
Error while refreshing the app
V0 project not building on vercel
404 not found
Auth doesn't work in production, but works locally
Rest api not working
Auction Genius - Multivendor Auction and Bidding Platform front end
Successful Deployment
Can't install dependencies for node_canvas
React Router and Vite App: 404 Error for Routes on Vercel Deployment
P5.js sketch not shown in Vercel
I'm having trouble with my Twitter clone
I'm having trouble with my Twitter clone
There was a permanent problem cloning the repo
Python serverless function returns 404 in local, but fine in prod
404 on deployment
Nuxt proxy route rule not getting picked up
Millions of 404 Edge Requests to _ssgManifest, _buildManifest
New app not working
Internal files being exposed as static assets
Next.js 14.2, and output: "export" combined with basePath
Production issue with 404 page in pages router
Deploy went well but got 404 not found error on Angular app
Seeking Help: Persistent "Soft 404" Errors on Vercel-Hosted Site
A server-side exception has occurred - Syntax error on parsing a JSON
404s on the first access to the homepage
Pages broken when deployed
Getting 404 when clicking on failed deploy on github
Can't host serverless functions and API routes at the same time
Issues with deploying a Next.js app
Flutter App could not could not be deployed on Vercel
Next.js App API route returning 404 even though route is present
Astro Server Islands and Vercel ISR causes 404
404 "NOT_FOUND" on after vite deployment
Rewrite rule not working for WordPress subdirectory
Project worked fine before migrating it to typescript, now 404
Unable to access sitemap.xml and robots.txt
404 not found
Blank Pages and Asset 404s When Unifying Multiple Domains in Next.js
Routing issue
How to map path parameters in golang?
Deployment Issue: 404 NOT_FOUND Error for Single Page App
Dynamic routes resolve in 404 using generateStaticParams
Error 404 - How to fix this deployment error?
Getting 404 on all css, javascript and other files
Getting 404 NOT_FOUND error in my django app
Constant 404 error after deployment
Top Paths logs contain .well-known/resource-that-should-not-exist
Deployment not found after publishing a subdomain
Do chunks names change?
Database Connectivity Issue with Supabase Integration
Site display problem after deploy
404 Error after Deploying from GitHub
Issues with error 404 on deploy
Unable to apply Jquery. Also getting 404 for other routes except index
Vercel caching my domain after deleting it
Error 404 code not found
Python api integration in html website erroring
Expo App Deployment
Creating Deployment via Platform API Failed 400
404 Error on Vercel Deployment Despite Successful Build
404 on the other routes I created in my Node.js express app
Erro 404 not found
404 Error on Vercel Deployment Despite Successful Build
Application Error
DNS/Build issues: Using Ionos as domain registrar
404: not_found
There is nothing runtime logs displayed in astro project
Getting 404: NOT FOUND in vercel deployment of my project
My old website, which has been deleted , is still showing up in search
Gmail image 404
ERROR 404 not found
Can't visit deployed project
Cors issue while deployment
Deployment error
App does not fetch data in production and no errors
Assets folder missing for sub project
Vercel can't find my index.js
Help with Redirect Issue after Refresh in Next.js App on Vercel
Some unknown tailwind/postcss error that stops deployment on vercel
404 error after sucessful deploy
Vercel Platforms Starter Kit 404 page not found
Nuxt 3 app deploy - trying to load an older chunk
404 Error Issue
Vercel build error
`notFound()` returns 200 instead of 404
Pnpm install fails with shared-workspace-lockfile=false
Vite.js + React: Asset Loading & CORS Issues in Vercel Dev
API 404 on Custom Domain (jobseekzm.com) - Works on Previews
Untitled blank screen or application error or a 404 error
CORs issues
[ISSUE] Express+Mongo API backend Not working on Vercel
Trying to host a Bluesky custom feed generator on Vercel, need help!
V0 - 404: Unable to access dashboard or chats
Erro com meu projeto que não consigo resolver
Flags Explorer not working in development with NextJS App Router
Vercel integration is giving 404
If the page was previously cached as a 404
Helvetica Font Applied by Default on Next.js 404 Page
Custom Domain Error 404 not found
404 NOT_FOUND deploying Python Flask App on Vercel, linked to github
The 404 Error
Error: ENOENT: no such file or directory, lstat '
What am I doing wrong? 404s, Forks, errors
Next.js API routes do not work when Go function is present
Website is not showing up
I did deploy correctly, but it tells me error 404 not found
404 on Refresh/Direct Access for SPA Subpaths (Vercel Deployment)
Getting 500 Internal Server Error FastAPI
Dynamic API Routes Returning HTML 404 Pages Instead of Route Handlers
Apex domain not resolving
How I can access the run time application log to fix 404 Error
Update payment informations redirect to << 404 not found "
404 error on link test and authentication required on health check
Persistent 404 Error
Persistent 404 Error
Next js 15 app random pages showing soft 404 on search console
Integrations giving 404
Can't crate a database
Can my users setup custom DNS for their page?
Fonts not loading
Dynamic routing is working on localhost but not on Vercel
Serverless functions running on prod but not local dev
Todos os projetos estão retornando 404 NOT_FOUND com deploy "Ready"
Domain Still Resolving to Vercel After Deletion and DNS Change
404: not_found
Deploy nestjs on vercel
Persistent 404 NOT_FOUND
Trouble in a big project
V0-sdk not working. returning iframe url returns a 404
Another 404 NOT FOUND
404 “NOT_FOUND” on after python app deployment
404 on Custom Domain (reflection-proxy.com) – Works on *.vercel.app
Successful Build Returns 404 Despite Route Output and Domain Alias
Inconsistent catch-all route behavior between local build & Vercel
Next.js Works Locally but Shows 404 After Vercel Deployment – Why?
Sign in with Vercel on Next.js Learn
404 NOT_FOUND for FastAPI Deployment
Help hosting backend and frontend on same project
Deploying Flask Backend on Vercel
Locally okay website is 404 in vercel
Issue with Express server
Issue with Express server
404 error and Error Loading Dashboard
Unable to Access Project: 404 Page Error after Login
Erro 404 na rota
cacheComponents and intercepting routes problem
Can't submit a created case through "Help"
NestJS Project Builds Successfully on Vercel but All Routes Return 404
Vercel dev ignoring rewrites section of vercel.json
The load takes too long and times out.(100dollers)
Deployment succeeds but all routes return 404
404 Error on Root Path with Correct Static File Config
Nameserver/DNS issue
Erro 404 no template Supabase Starter
Project has black screen even tho run preview works fine in vs code
Requesting help 404 Not Found Checkout Shopify Headless Store
Redirect preview environment root path when using `basePath`
My domain still goes to Vercel after removing from account
404 NOT_FOUND on subdirectories with correct setup
404 Not_Found Error
404 Not_Found Error
I've added some apis in my project, but vercel cannot recognize?
404 only on 1 specific page but rest work
Errors in `Metadata`: Configured but unable to recogonize it
When I visit my website I cannot reload it
404 not found
Gatsby v5 not working when deployed to vercel but works locally
404 Not_Found Error
404 (Not Found) on POST
How to redirect abc.vercel.app/login to abc.vercel.app/ after refresh
Help: Lost team and access to four live projects: SOLVED
Next.js project is throwing 404 errors
Dynamic route is not found in prod. it works fine on localhost
Getting 404: NOT_FOUND error with Angular app
Getting 404 error on React project
Getting 404 on Full-Stack Vite/Node.js app
Unable to use Vercel Nameservers
Vue app throws 404 from routes outside homepage
Getting a 404 Error with correct URL
Page is missing after deploying Vite + PHP site
Deployment Failing without error
Stripe Checkout redirect 404 on Vercel (Deployment not found)
Deploy nexjts fail on Vercel
404 Error Github
React Router and Vite App: 404 Error for Routes on Vercel Deployment
Vercel deploys invalid version of turborepo app
Expo Web SPA on Vercel: 404 Error When Refreshing Internal Routes
Deploying backend shows 404 in prod
All Next.js 15 App Router dynamic API routes return 404 on Vercel
Sveltekit 2 + vercel - api routes are failing with 404 on vercel
Next.js 15 build succeeds but page chunks missing in Vercel deployment
Next gives 404 page when refreshing, but works when using next link
Personal "team" Projects are gone
Vercel integration is giving 404
Vercel integration 404 issue
Custom domain invalid configuration with custom firewall
React Router and Vite App: 404 Error for Routes on Vercel Deployment
Next.js 15 deployment missing page chunk, causing hydration fail
Static build skipped – only serverless function deployed
Persistent 404 on onyx-drift.com
Vercel doesn't support Nextjs Link prefetching
Domain not appearing in my Vercel account
Deployment of tanstack start on Vercel in a pnpm turborepo
Vercel's edge alias
Problem with my rust powered blog site.
Lost access to Vercel project team – deployment exists but team page returns 404
My domain directsupplyghana.com is still being served by Vercel edge
domain troubles!
Urgent request to suspend a phishing website hosted on vercel and has been reported multiple times.
Deployment Failure
V0 deployment issue
Transitioning Quasar from SPA to SSR and 404ing. Tips on deployment?
404 not found error when an Express.js project is deployed
Transitioning Quasar from SPA to SSR and 404ing. Tips on deployment?
Error in my website project
MDX files is not found 404
MDX files is not found 404
404 error on node.js project
Verifying blob storage callback
404 error on node.js project
React Vite, activity logs not viewabl
Vercel Deployment 404 Failure
Next.js App Deployment Issue - 404 NOT_FOUND
Issues with resend
Millions of edge requests on my site thanks to Uptimerobot
Custom domains 404 despite correct DNS & healthy build
Rewrite to index.html ignored for React + Vite SPA (404 on routes)
Help with 404 Error
React + Vite + createBrowserRouter: Production 404 on Nested Routes
Vercel.json - the "has" condition on "host" doesn't seem to work?
404 error not found during deployment
404 no warnings everything appears clean
NOT_FOUND when F5
Unable to use wildcard for subdomains
Can't remove domain
Having issue with FastAPI
Nextra Site not deploying on vercel
Cant deploy the app
Error: Connection closed
Shadcn add fails: v0 component ‘date-picker’ not found in registry
ReactJS app error in latest deployment
DNS_HOSTNAME_RESOLVED_PRIVATE Error with Custom Auth0 Domain