Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Search Console indexing page with -surround url #3074

Open
richard-edwards opened this issue Feb 1, 2025 · 2 comments
Open

Google Search Console indexing page with -surround url #3074

richard-edwards opened this issue Feb 1, 2025 · 2 comments
Labels
v2 Relevant for @nuxt/content v2

Comments

@richard-edwards
Copy link

Environment

  • Operating System: Linux
  • Node Version: v18.18.2
  • Nuxt Version: 3.10.3
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: pnpm@8.15.4
  • Builder: -
  • User Config: $development, debug, site, seo, vite, build, watch, typescript, extends, modules, eslint, umami, components, ui, fontMetrics, googleFonts, imports, runtimeConfig, supabase, dayjs, ogImage, routeRules, sitemap, robots, seoExperiments, schemaOrg, linkChecker, devtools
  • Runtime Modules: @nuxt/test-utils/module@3.12.1, @nuxtjs/seo@2.0.0-rc.10, @nuxtjs/supabase@1.1.7, @pinia/nuxt@0.5.1, @nuxt/content@2.12.1, @nuxt/image@1.4.0, @nuxt/ui, @nuxtjs/fontaine@0.4.1, @nuxtjs/google-fonts@3.1.3, @vueuse/nuxt@10.9.0, @vue-email/nuxt@0.8.19, dayjs-nuxt@2.1.9, @nuxt/eslint@0.3.9, nuxt-umami@3.1.1
  • Build Modules: -

Version

v2.12

Reproduction

I have no reproduction. Just the actual site urls I mentioned above.

Description

Looking at Google Search Console and pages that are getting errors I'm seeing urls such as this:

https://golfpoolpro.com/tournaments/2025-charles-schwab-challenge-golf-pool-surround

which is generating a 404 because it isn't a page. The actual page is https://golfpoolpro.com/tournaments/2025-charles-schwab-challenge-golf-pool which seems to be getting indexed.

Just wondering why that other url is getting found by the Google bot and if there is something I can do so these don't get indexed. I am using content surround for prev/next links.

Additional context

No response

Logs

@richard-edwards richard-edwards added the v2 Relevant for @nuxt/content v2 label Feb 1, 2025
@farnabaz
Copy link
Member

farnabaz commented Feb 3, 2025

Do you use ${useRoute().path}-surround as useAsyncData key?

useAsyncData(`${useRoute().path}-surround`, () => ....)

I think this naming causes the generate of a semi-url key in <script id="__NUXT_DATA__" and Google extracts this key and believes it is a real URL.

@richard-edwards
Copy link
Author

Thank you so much. I just made changes to three files that had that and I'll keep a watch. I think I grabbed that code from somewhere. Probably nuxt-ui samples but I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Relevant for @nuxt/content v2
Projects
None yet
Development

No branches or pull requests

2 participants