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

Canonical Links with HrefLang Tags #60

Open
solverat opened this issue May 5, 2020 · 0 comments
Open

Canonical Links with HrefLang Tags #60

solverat opened this issue May 5, 2020 · 0 comments
Labels

Comments

@solverat
Copy link
Member

solverat commented May 5, 2020

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no

Given Scenario

  • Page: https://domain.com/my-page
  • Available Locales: de and en
  • Default Locale: en

Current Result

Default Request

GET https://domain.com/my-page/en
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="x-default">
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="en">
<link href="https://domain.com/my-page/de" rel="alternate" hreflang="de">

Query Request

GET https://domain.com/my-page/en?page=2
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="x-default">
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="en">
<link href="https://domain.com/my-page/de" rel="alternate" hreflang="de">

Desired Result

Default Request

GET https://domain.com/my-page/en
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="x-default">
<link href="https://domain.com/my-page/en" rel="alternate" hreflang="en">
<link href="https://domain.com/my-page/de" rel="alternate" hreflang="de">

Query Request

GET https://domain.com/my-page/en?page=2
<link rel="canonical" href="https://domain.com/my-page/en">

To Define

  • Make this option configurable (i18n.canonical_query_urls: true)
  • What about pretty Urls (e.g. https://domain.com/mypage/en/page/1)?
@solverat solverat added the task label May 5, 2020
@solverat solverat added this to the 3.3.0 milestone Nov 4, 2020
@scrummer scrummer modified the milestones: 4.0.0, 4.2.0 Mar 6, 2023
@solverat solverat removed this from the 4.2.0 milestone Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants