Detect and resolve chained redirects

Created on 6 October 2025, about 1 month ago

Problem / Motivation

Currently, some sites have chained redirects (5-6 consecutive redirects), especially after content deletion.
This causes performance issues, affects proper URL indexing, and complicates redirect maintenance.

We need functionality that can:

  • Detect chained redirects.
  • Create a direct redirect from the first URL to the last URL in the chain.
  • Remove intermediate redirects.

Steps to reproduce

  1. Create several consecutive redirects: A → B → C → D.
  2. Access the initial URL (A) and observe that the chain of redirects still exists.
  3. Notice that the final redirect is not direct and multiple intermediate jumps occur.

Proposed resolution

  1. Create a Drupal service that encapsulates the logic to detect and resolve chained redirects.
  2. Create an auxiliary table to store redirect entity IDs with status: processed / unprocessed.
  3. Add an administration form for manual management.
📌 Task
Status

Active

Version

1.12

Component

Code

Created by

🇪🇸Spain antonio.nunez Spain

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Pipeline finished with Failed
    about 1 month ago
    Total: 179s
    #620506
  • Pipeline finished with Failed
    about 1 month ago
    Total: 220s
    #620683
  • Pipeline finished with Failed
    about 1 month ago
    Total: 359s
    #621553
  • Pipeline finished with Success
    about 1 month ago
    Total: 224s
    #621600
  • Pipeline finished with Canceled
    26 days ago
    #631362
  • Pipeline finished with Failed
    26 days ago
    #631364
  • Pipeline finished with Success
    26 days ago
    #631384
  • Pipeline finished with Failed
    18 days ago
    Total: 268s
    #639221
Production build 0.71.5 2024