Title: redirect_this_site
Published: April 25, 2014
Last modified: May 20, 2026

---

# redirect_this_site( array|string $deprecated = '' ): string[]

## In this article

 * [Description](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#description)
    - [See also](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#see-also)
 * [Parameters](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#parameters)
 * [Return](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#return)
 * [Source](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#source)
 * [Related](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#related)
 * [Changelog](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#changelog)

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

Ensures that the current site’s domain is listed in the allowed redirect host list.

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

### 󠀁[See also](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#see-also)󠁿

 * [wp_validate_redirect()](https://developer.wordpress.org/reference/functions/wp_validate_redirect/)

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

 `$deprecated`array|stringoptional

Not used.

Default:`''`

## 󠀁[Return](https://developer.wordpress.org/reference/functions/redirect_this_site/?output_format=md#return)󠁿

 string[] An array containing the current site’s domain.

 * `0` string
 * The current site’s domain.

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

    ```php
    function redirect_this_site( $deprecated = '' ) {
    	return array( get_network()->domain );
    }
    ```

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

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

| Uses | Description | 
| [get_network()](https://developer.wordpress.org/reference/functions/get_network/)`wp-includes/ms-network.php` |

Retrieves network data given a network ID or network object.

  |

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

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

## User Contributed Notes

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