nuxt.js - My Nuxt webapp pages are flagged as Soft 404 on google search console despite pages exist - Stack Overflow

admin2025-04-17  4

Versions

  • Nuxt: v3.14.1592
  • Node: v20.10.0

Reproduction

  • /

nuxt.config.js:

import { resolve } from "path";

export default defineNuxtConfig({
  compatibilityDate: "2024-11-01",
  devtools: { enabled: false },
  nitro: {
    prerender: {
      crawlLinks: true,
    },
  },
  alias: {
    "@": resolve(__dirname, "/"),
  },
  modules: ["@pinia/nuxt"],
  plugins: [
    "~/plugins/prescripts.js",
    "~/plugins/paypal.js",
    "~/plugins/track.js",
  ],
  pinia: {
    storesDirs: ["./stores/**"],
  },
  nitro: {
    middleware: ["~/server/middleware/proxy"],
  },
  vue: {
    compilerOptions: {
      isCustomElement: (tag) => tag.startsWith("ion-"),
    },
  },
  serverHandlers: [
    {
      route: "/api",
      handler: "~/server/middleware/proxy.js",
    },
  ],
});


Steps to reproduce

  1. Load up the reproduction URL which has been built using npm run build && node ./server/index.mjs
  2. Observe the fact that the page has loaded
  3. Consider viewing the network in console
  4. Reload the page

What is Expected?

The page should load correctly and be indexable by Google with all of the relevant resources, it should be reachable by a search engine.

What is actually happening?

For some strange reason, despite my URL being accessible by Google PageSpeed Insights and via the URL, Google is having trouble indexing the pages and flagging them as Soft 404.

When I click on the error, and I choose the option to Test live URL > Screenshot, I find that the page returned is the default 404 page. For whatever reason, when Google tries to index the page, gets the default 404 page.

I'll attach a screenshot, and I would appreciate some guidance or suggestions here, thanks

转载请注明原文地址:http://anycun.com/QandA/1744895425a89145.html