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

[SEO] Alternate links shouldn't include GET parameters #3296

Open
divine opened this issue Jan 7, 2025 · 1 comment
Open

[SEO] Alternate links shouldn't include GET parameters #3296

divine opened this issue Jan 7, 2025 · 1 comment

Comments

@divine
Copy link

divine commented Jan 7, 2025

Environment

Reproduction

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-wyqxn9h2?file=nuxt.config.ts

Describe the bug

Hello,

Currently alternate links are broken. It's harming SEO as search engines marks this as duplicate pages. Also harmful sites could use this to boost their SEO.

Visiting:
https://example.com/en

Generates:

<link id="i18n-can" rel="canonical" href="/en">
<meta id="i18n-og-url" content="/en" property="og:url">

Visiting:
https://example.com/en?link=harmful.com

Generates:

<link id="i18n-xd" rel="alternate" href="/en?link=harmful.com" hreflang="x-default">
<link id="i18n-can" rel="canonical" href="/en">
<meta id="i18n-og-url" content="/en" property="og:url">

This should be optional and disabled by default like canonicalQueries options that we currently have.

Thanks!

Additional context

No response

Logs

@divine
Copy link
Author

divine commented Jan 8, 2025

Update: this bug was introduced in v8 so it's undocumented breaking change from v7 and should be reverted back.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant