HTTP/2 301
server: nginx
date: Tue, 30 Dec 2025 07:07:57 GMT
content-type: text/html; charset=UTF-8
x-olaf: ⛄
vary: accept, content-type
x-redirect-by: WordPress
location: https://developer.wordpress.org/reference/hooks/wp_headers/
x-frame-options: SAMEORIGIN
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
HTTP/2 200
server: nginx
date: Tue, 30 Dec 2025 07:07:57 GMT
content-type: text/html; charset=UTF-8
vary: Accept-Encoding
x-olaf: ⛄
vary: accept, content-type
link:
; rel="https://api.w.org/"
link:
; rel="alternate"; title="JSON"; type="application/json"
link: ; rel=shortlink
x-frame-options: SAMEORIGIN
content-encoding: gzip
alt-svc: h3=":443"; ma=86400
x-nc: MISS ord 1
wp_headers – Hook | Developer.WordPress.org
apply_filters ( ‘wp_headers’, string[] $headers , WP $wp )
Filters the HTTP headers before they’re sent to the browser.
$headersstring[] Associative array of headers to be sent.
$wpWP Current WordPress environment instance.
Version Description 2.8.0 Introduced.
This filter won’t allow you to modify headers if your site serves cached pages via a plugin or third-party caching system. The cached page will be served before your wp_headers are filtered.
You may be able to add an HTML meta tag with the http-equiv attribute using wp_head() to work around this for certain headers: https://reference.sitepoint.com/html/meta/http-equiv
Alternatively, explore setting headers at the server level with .htaccess or similar if you can.
header set X-Clacks-Overhead "GNU Terry Pratchett"