I’m running into a persistent 404 on my Next.js (App Router) project after deploying to Vercel. The build logs show a successful compile with a valid root route (/), and everything appears fine locally. However, visiting either my custom domain or the *.vercel.app subdomain always returns a 404.
Here’s what I’ve already tried:
Root Route Check: Confirmed I have src/app/page.tsx with a default export (export default function Home() {…}).
DNS Configuration:
• Apex domain points to 76.76.21.21 (A record)
• www subdomain is set as a CNAME to my .vercel.app
• Removed any circular references or extra CNAMEs.
Vercel Project Settings:
• No “Root Directory” is set, because my code is in the repository root (with next.config.js and package.json there).
• The domain is confirmed as “Valid Configuration” in Vercel.
• I removed and re-added the domain to ensure no stale settings.
Production Deployment: Double-checked that I’m deploying on the main branch and that the latest deployment is indeed marked as “Production.”
Local Production Test: Ran npm run build && npm run start locally, and the site serves correctly on http://localhost:3000.
Despite all this, visiting my domain or the .vercel.app link still yields a 404. If anyone has run into a similar issue or has suggestions for what else to check, I’d really appreciate the help!
I did, yes. I did notice I didn’t have any sort of index file in my output, but I don’t know why that isn’t there. I have three other websites I have deployed with Vercel, and while they all have an index in their output, I can’t actually find that file in my codebase. I assume that is something Vercel creates during the build process, but that’s just a guess.