Skip to content

Canonical links removing explicit trailing slash #1461

Open
@guilherssousa

Description

Describe the bug
A clear and concise description of what the bug is.

I'm expecting my code to generate the rel=canonical tag with the link ending with a trailing slash, and, although it has been added explicitly on the canonical prop string, it still gets removed.

Reproduction
For issues to be triaged in a timely manner please provide a Codesandbox/Github of the issue in it's simplest reproduction.

      <NextSEO
        title={/* redacted */}
        description={/* redacted */}
        canonical={`https://redacted.com/${slug}/`}
        />

returns <link rel="canonical" href="https://redacted.com/slug">

Expected behavior
A clear and concise description of what you expected to happen.

I expect it to return the canonical href as https://redacted.com/slug/

Additional context
Add any other context about the problem here.

Running on Next SEO 6.5.0 and Next 14.1.4

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions