Title: Random WordPress Generated Redirects
Last modified: April 22, 2024

---

# Random WordPress Generated Redirects

 *  [lperryau](https://wordpress.org/support/users/lperryau/)
 * (@lperryau)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/random-wordpress-generated-redirects/)
 * Hi there,
 * We seem to be having an issue with this page: [https://slatediscounts.com.au/bluestone/pavers/](https://slatediscounts.com.au/bluestone/pavers/)
   randomly creating a redirect chain from pages that don’t exist, to finally redirecting
   to a page that does exist (but is not the page in question, but more so this 
   one: [https://slatediscounts.com.au/pavers-brisbane/](https://slatediscounts.com.au/pavers-brisbane/))
 * What I have investigated so far:
    - Checked WordPress redirect plugins for conflicts
    - Examined .htaccess rules for manual 301 redirects
    - Investigated WordPress database(Checked the wp_options and wp_postmeta tables
      in the WordPress database to check for settings or redirects stored there,
      including serialized data)
    - Took the serialized PHP array and unserialised it, didn’t find anything
    - Analysed wp_redirect function
    - Disabled canonical redirects temporarily
    - Reviewed WordPress rewrite rules
    - Checked for PHP errors or logs
    - Debugged with WordPress debugging tools, which I can provide more info from
      if requested.
    - Used SQL queries to investigate and dig through the database
 * The headers in the browser (Mozilla Firefox) also indicate that this redirect
   is powered by WordPress, but I haven’t been able to find exactly **_where_ **
   this is occurring.
 * > [View post on imgur.com](https://imgur.com/a/UqlOkE1)
 * The redirect chain is rather complicated, and starts off with requesting the 
   actual URL ([https://slatediscounts.com.au/bluestone/pavers/](https://slatediscounts.com.au/bluestone/pavers/)),
   then appends a /paver/ to the next URL until it finds [https://slatediscounts.com.au/pavers-brisbane/](https://slatediscounts.com.au/pavers-brisbane/))
   which I assume WordPress dictates is the “right” URL)
 * > [View post on imgur.com](https://imgur.com/a/tb1YLMQ)
 * Is there anything obvious, that would likely be causing this problem?
 * Any help would be greatly appreciated.
 * Thanks!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Frandom-wordpress-generated-redirects%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Sebastien SERRE](https://wordpress.org/support/users/sebastienserre/)
 * (@sebastienserre)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/random-wordpress-generated-redirects/#post-17703543)
 * Hello,
 * You should search for a conflict to determine where the redirect comes.
   As you
   can see on `wp_redirect()` , “WordPress” is the default parameter.[https://github.com/WordPress/wordpress-develop/blob/4f02bc74e6895370969f1ec79d27edede6cb054d/src/wp-includes/pluggable.php#L1385](https://github.com/WordPress/wordpress-develop/blob/4f02bc74e6895370969f1ec79d27edede6cb054d/src/wp-includes/pluggable.php#L1385)
   This is the same for the other WordPress redirect functions.It means if a theme
   or a plugin do not customize this parameter, then the Browsers are saying t=it’s
   done by WordPress… which is not necessarily the truth.As far I know, only Polylang,
   Redirections and Yoast SEO are using this parameter which is useful for debug.
   To find a conflict:
    1. disable all your plugins, mu-plugins and active a TT1 theme
    2. Check you don’t reproduce the issue
    3. Activate your theme – redo step 2
    4. Activate a 1st plugin – redo step 2
    5. Proceed for each plugins until finding the conflict
 *  Thread Starter [lperryau](https://wordpress.org/support/users/lperryau/)
 * (@lperryau)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/random-wordpress-generated-redirects/#post-17709254)
 * Hi [@sebastienserre](https://wordpress.org/support/users/sebastienserre/) ,
 * Thanks for taking the time to reply back to me.
 * I would assume with the `wp_redirect` hook, and that the browser headers indicate`
   x-redirect-by-WordPress` this would be the hook responsible for forcing the redirect,
   but you are saying this may not be the case?
 * _“As far I know, only Polylang, Redirections and Yoast SEO are using this parameter
   which is useful for debug.”_ I’ve gone through our list of plugins and we don’t
   use any of these. We use RankMath as the SEO plugin of choice, but I disabled
   the Redirections option on the plugin and we never specified redirects through
   this plugin either. I also checked the tables responsible for these redirections
   through PHPMyAdmin and the rows were empty.
 * We are working during business hours, so I can’t troubleshoot the site as efficiently
   as I would like in terms of themes/plugins.
 * Do you know if there is any specific debugging I can use regarding these:
    - `redirect_canonical`
    - `template_redirect`
    - `wp_redirect`
 * I have all of the rewrites this site uses, but none of them appear to be relevant
   to how or why this page is being redirected. (I can paste the full list if needed)
 * I would assume there is some specific problem with one of these causing issues.
 * Thanks for your help so far!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Random WordPress Generated Redirects’ is closed to new replies.

## Tags

 * [redirect](https://wordpress.org/support/topic-tag/redirect/)

 * In: [Everything else WordPress](https://wordpress.org/support/forum/miscellaneous/)
 * 2 replies
 * 2 participants
 * Last reply from: [lperryau](https://wordpress.org/support/users/lperryau/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/random-wordpress-generated-redirects/#post-17709254)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
