<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jeremy Burgos</title>
    <description>The latest articles on DEV Community by Jeremy Burgos (@jeremy-burgos).</description>
    <link>https://dev.to/jeremy-burgos</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3940901%2Fe5254be5-4876-4b2e-a167-06beb4d55018.png</url>
      <title>DEV Community: Jeremy Burgos</title>
      <link>https://dev.to/jeremy-burgos</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jeremy-burgos"/>
    <language>en</language>
    <item>
      <title>Four HTTP security headers every WordPress site should set</title>
      <dc:creator>Jeremy Burgos</dc:creator>
      <pubDate>Tue, 02 Jun 2026 10:30:00 +0000</pubDate>
      <link>https://dev.to/jeremy-burgos/four-http-security-headers-every-wordpress-site-should-set-27pd</link>
      <guid>https://dev.to/jeremy-burgos/four-http-security-headers-every-wordpress-site-should-set-27pd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;TL;DR: Four response headers, a few minutes of work, most of the header-level security gap closed. Exact values below, plus a one-line curl to check any site.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Run this against your own site first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-I&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; https://yoursite.com | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="nt"&gt;-i&lt;/span&gt; &lt;span class="nt"&gt;-E&lt;/span&gt; &lt;span class="s1"&gt;'strict-transport|x-content|x-frame|referrer'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whatever does not come back is your to-do list. These four headers are public on every request and contain nothing sensitive, so you can check mine, I can check yours, and neither of us has to log into anything. Here is what each one is and the value I actually run in production.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20jf0z700wmscyls9lm7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F20jf0z700wmscyls9lm7.png" alt="terminal curl output" width="800" height="358"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Strict-Transport-Security
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;strict-transport-security: max-age=31536000; includeSubDomains; preload
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tells the browser to use HTTPS for your domain, full stop, for the max-age window. Once a browser has seen it, typing &lt;code&gt;http://&lt;/code&gt; does nothing; the browser refuses to send the insecure request. &lt;code&gt;max-age=31536000&lt;/code&gt; is one year. &lt;code&gt;includeSubDomains&lt;/code&gt; pushes the rule to every subdomain, closing the gap where an attacker targets some forgotten staging host. &lt;code&gt;preload&lt;/code&gt; is the part people skip, and it matters: without it, the very first request before the browser has ever seen your header can still go out over HTTP, and that first request is the attack window. Preloaded domains skip it because the browser ships already knowing your domain is HTTPS-only. Submit once at hstspreload.org, it is free, and inclusion rides the Chromium release train so it takes a few weeks.&lt;/p&gt;

&lt;h3&gt;
  
  
  X-Content-Type-Options
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;x-content-type-options: nosniff
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Browsers used to guess at content types when the server was vague, which is exploitable. &lt;code&gt;nosniff&lt;/code&gt; tells the browser to trust the declared Content-Type and stop guessing. There is no other value and nothing to tune. If your production site is missing this, you can fix it before you finish this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  X-Frame-Options
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;x-frame-options: SAMEORIGIN
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Your clickjacking defense. It stops someone loading your real, logged-in site in an invisible iframe and floating their own buttons over it. &lt;code&gt;SAMEORIGIN&lt;/code&gt; allows only your own pages to frame your site. &lt;code&gt;DENY&lt;/code&gt; blocks all framing including yours, which is wrong if your WordPress setup uses internal iframes (Elementor previews, some widgets). The modern successor is CSP's &lt;code&gt;frame-ancestors&lt;/code&gt;; run both during the transition, X-Frame-Options for older clients, CSP for the rest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Referrer-Policy
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight http"&gt;&lt;code&gt;&lt;span class="err"&gt;referrer-policy: strict-origin-when-cross-origin
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Controls what your site leaks about users when they click away. &lt;code&gt;strict-origin-when-cross-origin&lt;/code&gt; sends the full URL on same-origin requests so your analytics still work, only the origin on cross-origin HTTPS so you are not leaking that someone was on &lt;code&gt;/account/billing&lt;/code&gt;, and nothing on cross-origin HTTP. Set it explicitly so you are not at the mercy of whatever default the next browser release ships.&lt;/p&gt;

&lt;h3&gt;
  
  
  Verifying
&lt;/h3&gt;

&lt;p&gt;The curl above is the fastest check; all four lines should come back. In a browser, DevTools, Network tab, click the document request, read Response Headers. For a letter grade, &lt;a href="https://securityheaders.com" rel="noopener noreferrer"&gt;securityheaders.com&lt;/a&gt; scores you against a known rubric. One quirk: these four alone land a B, and you reach A only once you add Content-Security-Policy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmaoaagr9qebye0s7oggm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmaoaagr9qebye0s7oggm.png" alt="security headers result example" width="800" height="399"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bn8y2ilcxr46icwhloo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F0bn8y2ilcxr46icwhloo.png" alt="dev tools example" width="799" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These four are the floor. The next layer is Permissions-Policy and CSP in report-only mode. But if you only ever do these four, you have closed most of the gap, in minutes.&lt;/p&gt;

&lt;p&gt;Originally published at &lt;a href="https://www.webstackdefense.com/security-headers-production-websites/" rel="noopener noreferrer"&gt;https://www.webstackdefense.com/security-headers-production-websites/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>security</category>
      <category>wordpress</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
