Title: strict_redirect_guess_404_permalink
Published: August 11, 2020
Last modified: May 20, 2026

---

# apply_filters( ‘strict_redirect_guess_404_permalink’, bool $strict_guess )

## In this article

 * [Description](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#description)
 * [Parameters](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#wp--skip-link--target)

Filters whether to perform a strict guess for a 404 redirect.

## 󠀁[Description](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#description)󠁿

Returning a truthy value from the filter will redirect only exact post_name matches.

## 󠀁[Parameters](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#parameters)󠁿

 `$strict_guess`bool

Whether to perform a strict guess. Default false (loose guess).

## 󠀁[Source](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#source)󠁿

    ```php
    $strict_guess = apply_filters( 'strict_redirect_guess_404_permalink', false );
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/canonical.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/canonical.php#L973)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/canonical.php#L973-L973)

## 󠀁[Related](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#related)󠁿

| Used by | Description | 
| [redirect_guess_404_permalink()](https://developer.wordpress.org/reference/functions/redirect_guess_404_permalink/)`wp-includes/canonical.php` |

Attempts to guess the correct URL for a 404 request based on query vars.

  |

## 󠀁[Changelog](https://developer.wordpress.org/reference/hooks/strict_redirect_guess_404_permalink/?output_format=md#changelog)󠁿

| Version | Description | 
| [5.5.0](https://developer.wordpress.org/reference/since/5.5.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fhooks%2Fstrict_redirect_guess_404_permalink%2F)
before being able to contribute a note or feedback.