Make WordPress Core

Opened 7 weeks ago

#64029 new defect (bug)

Canonical redirect on `/page/1/` forces HTTP instead of HTTPS behind proxy/CDN

Reported by: igor2021's profile igor2021 Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.8.2
Component: Canonical Keywords:
Focuses: Cc:

Description

When WordPress handles canonical redirects for paginated archives, it forces /page/1/ to /.
The problem: if the site is running behind a proxy/CDN (e.g. Cloudflare), WordPress sometimes issues the redirect to http:// instead of preserving the original https:// scheme.

This causes unnecessary redirect chains and breaks SEO performance.

Steps to reproduce:

  1. Open https://example.com/category/page/1/
  2. WordPress redirects to http://example.com/category/
  3. Proxy/CDN enforces HTTPS → results in 2 or 3 chained redirects.

Expected result:
WordPress should preserve the HTTPS scheme when performing canonical redirects (or allow disabling /page/1/ → / canonicalization via a filter/setting).

Notes:
This has been discussed by many site owners using HTTPS-only setups.
A core fix or an option in Settings would prevent extra redirect hops.

Change History (0)

Note: See TracTickets for help on using tickets.