[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[Help](/c/help/9)

# 404 Error on Vercel Deployment Despite Successful Build

841 views · 13 likes · 8 posts


Andrew Kolumbic (@drosshole) · 2025-02-08 · ♥ 2

Hello everyone,

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:

1. **Root Route Check:** Confirmed I have src/app/page.tsx with a default export (export default function Home() {...}).

2. **DNS Configuration:**

• Apex domain points to 76.76.21.21 (A record)

• www subdomain is set as a CNAME to my <project>.vercel.app

• Removed any circular references or extra CNAMEs.

3. **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.

4. **Production Deployment:** Double-checked that I’m deploying on the main branch and that the latest deployment is indeed marked as “Production.”

5. **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!

Thank you in advance!


system (@system) · 2025-02-08 · ♥ 1

There's another community post with 404 debugging tips that might be helpful. Please give these solutions a try and let us know how it goes.

https://community.vercel.com/t/debugging-404-errors/437

A human should be around soon to offer more advice. But you can also get helpful information quickly by asking [v0](https://v0.dev/).


Pauline P. Narvas (@pawlean) · 2025-02-11 · ♥ 1

Hey, Andrew! Welcome to the Vercel Community :wave: 

Could you share your URL with us? :eyes:


Andrew Kolumbic (@drosshole) · 2025-02-11 · ♥ 1

Hey Pauline, sure. The url is https://www.betonyourself.today/


Pauline P. Narvas (@pawlean) · 2025-02-11 · ♥ 2

Did you try going through the community post? :eyes: 

https://community.vercel.com/t/debugging-404-errors/437


Andrew Kolumbic (@drosshole) · 2025-02-11 · ♥ 1

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.


Anshuman Bhardwaj (@anshumanb) · 2025-02-12 · ♥ 3

Hi @drosshole, sorry that you're facing this issue.

Your project doesn't seem to have the `Next.js` preset selected. Using the Next.js preset and redeploying your application should fix this issue.

![CleanShot 2025-02-12 at 12.08.44@2x|690x398](upload://lpyWdSCSrBArzYYrikQtXE4cB9F.png)


Andrew Kolumbic (@drosshole) · 2025-02-12 · ♥ 2

This did it, thanks so much!