WordPress.org

Making WordPress.org

Opened 5 months ago

Last modified 3 months ago

#4325 accepted defect

Pagination and rel next/prev links should build from the canonical, not the request

Reported by: jonoaldersonwp Owned by: dd32
Milestone: Priority: lowest
Component: General Keywords: seo analytics
Cc:

Description (last modified by jonoaldersonwp)

Pagination links on templates like https://wordpress.org/support/plugin/eshop/page/20/?sausage=dog carry the query parameter through.

These links should instead be constructed from the canonical URL tag, rather than from the query/request.

E.g., the link to page 19 on https://wordpress.org/support/plugin/eshop/page/20/?sausage=dog should be https://wordpress.org/support/plugin/eshop/page/19/.

Additionally, rel next/prev tags in the head also carry the query; these should be built from the canonical.

E.g., the rel prev/next links on https://wordpress.org/plugins/tags/facebook/page/3/?qEGgVZWOMY6QuASuwpvADg&ved=0CD0QFjAHOGQ&usg=AFQjCNE96Vqc6usb8znBhhw9tvxNe3pKUw should be https://wordpress.org/plugins/tags/facebook/page/4/ and https://wordpress.org/plugins/tags/facebook/page/2/ respectievely.

Change History (3)

#1 @jonoaldersonwp
5 months ago

  • Component changed from Support Forums to General
  • Description modified (diff)
  • Summary changed from Pagination links should build from the canonical, not the request to Pagination and rel next/prev links should build from the canonical, not the request

This ticket was mentioned in Slack in #meta by tellyworth. View the logs.


3 months ago

#3 @dd32
3 months ago

  • Owner set to dd32
  • Status changed from new to accepted
Note: See TracTickets for help on using tickets.