Skip to content
Every tutorial here is 100% free — and always will be
LSLovableStudent

Why am I getting a 404 error?

Last checked 31 Aug 2026

Short answer

A 404 means the thing being requested doesn't exist at that path — check for a broken route, a renamed page, a missing database row, or a wrong API endpoint.

What 404 means

404 Not Found means the server couldn't find the specific resource requested — a page route, a file, or a database record. It's a "this doesn't exist here" error, distinct from 403 (exists, but you're not allowed) or a server error.

Diagnostic sequence

  1. Confirm the exact URL or path being requested when the 404 happens — is it a page route in the app, or an API/data request?
  2. If it's a page route: check whether that page/route still exists in the code, and whether it was recently renamed or removed.
  3. If it's a data request: check whether the record being queried (by ID or slug) actually exists in the database, or whether the query is using the wrong identifier.
  4. If it's an API call to a third-party service: confirm the endpoint URL and API version are correct.
  5. Check the Logs for backend function 404s if the error originates server-side.

What usually goes wrong

  • A page was renamed or a route restructured, but internal links still point to the old path.
  • Direct-linking to a dynamic page (e.g. /product/123) where the record with that ID was deleted or never existed.
  • Publishing the site and testing a URL that doesn't match the actual route structure (e.g. missing a trailing segment).
  • Calling a backend function or edge function by the wrong name or path after it was renamed.

Fixing it

I'm getting a 404 on [exact URL/path]. Check whether this route/record exists, and whether anything recently changed its path or ID.

If the 404 happens specifically after publishing but not in Preview, see /questions/why-does-my-app-work-in-preview-but-not-when-published — routing configuration can differ subtly between the two.

Sources

Was this answer helpful?

Related questions

Website made, maintained and hosted by PromptSites.com

PromptSites logo