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] Re-Support Canonical URLs with params #1713

Open
rickydazla opened this issue Jan 30, 2024 · 3 comments
Open

[SEO] Re-Support Canonical URLs with params #1713

rickydazla opened this issue Jan 30, 2024 · 3 comments

Comments

@rickydazla
Copy link

What is the location of your example repository?

#1478

Which package or tool is having this issue?

Hydrogen

What version of that package or tool are you using?

v2023.10

What version of Remix are you using?

No response

Steps to Reproduce

In package < v2023.10 canonical URLs with params were supported. PR #1478 removed this support as "URL parameters shouldn't appear in canonical tag (in most cases)." but that PR negates any support for cases where they should appear. e.g. We have URLs like /ties?color=blue that should be canonical (not /ties)

Can that PR be reverted?

Expected Behavior

Return canonical as /ties?color=blue

Actual Behavior

Returns canonical as /ties

@jayvin

This comment was marked as spam.

@frandiox
Copy link
Contributor

👋 Hi! Thanks for reporting this. We've been talking about this internally and we'll probably make some changes to the SEO component soon. cc @blittle

@blittle
Copy link
Contributor

blittle commented Jan 31, 2024

The main reason this change was made in the first place is often search parameters contain marketing identifiers that should never be a part of the canonical URL. We need to rethink how to do this. Potentially the SEO component could take an allow-list prop of search params that won't be stripped out. We are revisiting SEO more generally this quarter, and this should be addressed. In the mean time, if you require search params in your canonical URLs, I recommend not using the SEO component and instead just directly use export meta from your remix routes.

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

No branches or pull requests

4 participants