-
-
Notifications
You must be signed in to change notification settings - Fork 490
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
Comments
Update: this bug was introduced in v8 so it's undocumented breaking change from v7 and should be reverted back. |
@BobbieGoede can this be fixed, please? |
@divine |
@divine |
Hello, It was working fine prior with v7 but currently it's creating a duplicate content: See this Google article: https://developers.google.com/search/docs/specialty/international/localized-versions and there is a link Merkle SEO hreflang tag testing tool. You can check by typing a nuxt site like Also, see @ https://ahrefs.com/blog/hreflang-tags/ . No article mentions that alternate links should include get parameters - it's simply a duplicate content. You can't say to search engines: "Hey, give me a new get parameters and there is a more zillion duplicate pages!". Search engines will just sanction such site. I don't know why and who decided this to be a good idea to include the GET parameters. Also, I don't know why my contributions are empty now, @kazupon any idea? Thanks! |
It looks like your contributions can still be seen on the v7 branch (https://github.com/nuxt-modules/i18n/commits/v7/?author=divine), I didn't know Github doesn't credit commits which are no longer included in the current main branch 🤔 This is not intentional but I think it's due to v8 having been built from scratch for Nuxt 3, the routing code was separated into https://github.com/intlify/routing and later reimplemented (and refactored) back into this repo again, unfortunately it is entirely possible something broke along the way.
I understand the importance of not messing up SEO, which is why I'm trying to figure out what is the correct approach though it doesn't seem to be documented in clear language.. It doesn't help that the video included in the Google article shows an example of alternate links that do include query parameters video at example timestamp.
From what I can tell by looking at the tests on the v7 branch the alternate links did include query parameters in that version as well and you actually added parts of those tests 😅 I may be misunderstanding the test fixture/setup, maybe the query parameters there are intentional, just checking if the behavior actually differs from v7. |
Hello @BobbieGoede,
It's similar to canonical links. Let me try to explain. This is a screenshot from a video:
Google suggests stripping out all unrelated parameters so Basically, in my opinion this should be based on
It's intentional there so this should be stripped out. I've a running v7 and it's stripping out GET parameters from alternate links. Thanks! |
I made a reproduction to confirm whether your description matches the behavior in v7, but it doesn't appear to be the case, see https://stackblitz.com/edit/nuxt-starter-2oufh4of?file=nuxt.config.js,pages%2Findex.vue.
Did you patch v7 in your project to achieve this functionality or is there no change in behavior? 🤔 |
Well, I've just checked it now. I was using static build (Cloudflare Pages) so that's reason why it looked like it was working correctly. See @ https://github.com/divine/nuxt-starter-avn2janf pnpm install && pnpm build && pnpm generate && pnpm start Thanks! |
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:
Visiting:
https://example.com/en?link=harmful.com
Generates:
This should be optional and disabled by default like
canonicalQueries
options that we currently have.Thanks!
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: