Making WordPress.org

Opened 6 years ago

Closed 6 years ago

#3947 closed defect (bug) (fixed)

hreflang tag values should be derived from the canonical URL, not the request URL

Reported by: jonoaldersonwp's profile jonoaldersonwp Owned by: dd32's profile dd32
Milestone: Priority: high
Component: General Keywords:
Cc:

Description

Many of our pages use hreflang tags to indicate localised/translated variants. That value that they output is currently based on the request URL.

E.g., https://wordpress.org/download/?test=1234 outputs alternate URLs like https://bs.wordpress.org/download/?test=1234.

This is incorrect; the alternate values should be derived fom the requested page's canonical URL.

E.g., https://wordpress.org/download/?test=1234 should output alternate URLs like https://bs.wordpress.org/download/.

Change History (2)

#1 @tobifjellner
6 years ago

  • Summary changed from heflang tag values should be derived from the canonical URL, not the request URL to hreflang tag values should be derived from the canonical URL, not the request URL

#2 @dd32
6 years ago

  • Owner set to dd32
  • Resolution set to fixed
  • Status changed from new to closed

In 7898:

WordPress.org: hreflang: Add a default x-default hreflang tag and use the canonical URL for singular pages when possible.

Fixes #3947, #3948.

Note: See TracTickets for help on using tickets.