Title: wp_strict_cross_origin_referrer
Published: March 9, 2021
Last modified: May 20, 2026

---

# wp_strict_cross_origin_referrer()

## In this article

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

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

Displays a referrer `strict-origin-when-cross-origin` meta tag.

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

Outputs a referrer `strict-origin-when-cross-origin` meta tag that tells the browser
not to send the full URL as a referrer to other sites when cross-origin assets are
loaded.

Typical usage is as a [‘wp_head’](https://developer.wordpress.org/reference/hooks/wp_head/)
callback:

    ```php
    add_action( 'wp_head', 'wp_strict_cross_origin_referrer' );
    ```

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

    ```php
    function wp_strict_cross_origin_referrer() {
    	?>
    	<meta name='referrer' content='strict-origin-when-cross-origin' />
    	<?php
    }
    ```

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

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

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

Display a `noindex,noarchive` meta tag and referrer `strict-origin-when-cross-origin` meta tag.

  |

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

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

## User Contributed Notes

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