How Do I Add a Strict Transport Security Header in WordPress?

Adding a Strict Transport Security header to your WordPress site can help protect your site from attack. To add a header, first head to your WordPress site’s Settings page and search for the “Security” section. Click on the “Transport Security” header to open the settings. Under “Header Settings,” you’ll see a “Strict Transport Security” header option.

Select it and enter your site’s header information. You can also set a custom message to be displayed to browsers that don’t support the header. Click on the “Save Changes” button to finalize your settings. Your site will now include a Strict Transport Security header when viewed by browsers that support it.