i18n icon indicating copy to clipboard operation
i18n copied to clipboard

How can I remove the query parameters from the hreflang?

Open simplenotezy opened this issue 5 years ago • 6 comments

How can I remove the query parameters from the reflang URL?

simplenotezy avatar Nov 04 '20 10:11 simplenotezy

Do you mean hreflang (https://i18n.nuxtjs.org/seo#automatic-hreflang-generation)?

It doesn't seem like you can currently. It generates those URLs the same way as when generating URLs for switching locales.

What's the reason you don't want to include them?

rchl avatar Nov 04 '20 10:11 rchl

Thanks for a promt reply @rchl 😊

Because we currently use ?page=2 for an infinite product list, and we generate our site in static mode.

So I don't want the canonical/reflang URLs to point to ?page=2, since the HTML that the client would receive, would be the same as ?page=1

simplenotezy avatar Nov 04 '20 10:11 simplenotezy

canonical already doesn't include query params.

To be able to exclude specific query params there would need to be a new feature implemented.

rchl avatar Nov 04 '20 11:11 rchl

Sorry, i want to ask. Is possible i remove query params in hreflang that generates from i18n?

manullah avatar Dec 10 '20 01:12 manullah

No, as stated above

rchl avatar Dec 10 '20 16:12 rchl

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Feb 13 '21 08:02 stale[bot]