Skip to content

fix: add dynamic canonical tags to auth endpoints to fix duplicate SEO errors#267

Open
balpreetgrowthnatives wants to merge 1 commit into
Comfy-Org:mainfrom
balpreetgrowthnatives:fix-auth-canonical-tags
Open

fix: add dynamic canonical tags to auth endpoints to fix duplicate SEO errors#267
balpreetgrowthnatives wants to merge 1 commit into
Comfy-Org:mainfrom
balpreetgrowthnatives:fix-auth-canonical-tags

Conversation

@balpreetgrowthnatives

@balpreetgrowthnatives balpreetgrowthnatives commented Jun 10, 2026

Copy link
Copy Markdown

What does this PR do?

This PR injects a dynamic <link rel="canonical"> tag into the authentication layouts (login.tsx, signup.tsx, and logout.tsx) to resolve duplicate content SEO errors.

Why is this needed?

Currently, when login pages are accessed with state trackers like ?fromUrl=, Googlebot flags them as "Duplicate without user-selected canonical".

Implementation details:

To fix this without breaking Next.js internationalization (i18n), the canonical tag is generated dynamically using router.pathname and router.locale. This ensures that all query parameters are cleanly stripped out, while localized paths (like /zh-CN/auth/login) are safely preserved.

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Someone is attempting to deploy a commit to the ComfyUI Team on Vercel.

A member of the Team first needs to authorize it.

@balpreetgrowthnatives balpreetgrowthnatives marked this pull request as ready for review June 10, 2026 06:14
@balpreetgrowthnatives balpreetgrowthnatives changed the title chore: add dynamic canonical tags to auth endpoints to fix duplicate SEO errors fix: add dynamic canonical tags to auth endpoints to fix duplicate SEO errors Jun 10, 2026
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

Successfully merging this pull request may close these issues.

1 participant