Title: Getting syntax error when adding Header
Last modified: January 30, 2022

---

# Getting syntax error when adding Header

 *  Resolved [churwitz](https://wordpress.org/support/users/churwitz/)
 * (@churwitz)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntax-error-when-adding-header/)
 * Trying to add the following to the top of the htaccess file and getting a syntax
   error when I test before saving. Are Headers not editable in the plugin?
 *     ```
       # Really Simple SSL
       Header always set Strict-Transport-Security: "max-age=31536000" env=HTTPS 
       # End Really Simple SSL
       ```
   

Viewing 1 replies (of 1 total)

 *  Plugin Author [WebFactory](https://wordpress.org/support/users/webfactory/)
 * (@webfactory)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntax-error-when-adding-header/#post-15307032)
 * Htaccess editor doesn’t restrict what you can add to the `.htaccess` file. Headers,
   redirect code, blocking an IP – it’s all the same for the plugin 🙂
 * As for the code you’re adding I’d try this:
 *     ```
       <IfModule mod_headers.c>
       Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" env=HTTPS
       </IfModule>
       ```
   
 * If you have a minute, please leave a review. It’s what keeps support going. Thank
   you 🙏 [https://wordpress.org/support/plugin/wp-htaccess-editor/reviews/#new-post](https://wordpress.org/support/plugin/wp-htaccess-editor/reviews/#new-post)

Viewing 1 replies (of 1 total)

The topic ‘Getting syntax error when adding Header’ is closed to new replies.

 * ![](https://ps.w.org/wp-htaccess-editor/assets/icon-256x256.png?rev=2010639)
 * [Htaccess File Editor - Safely Edit Htaccess File](https://wordpress.org/plugins/wp-htaccess-editor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-htaccess-editor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-htaccess-editor/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-htaccess-editor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-htaccess-editor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-htaccess-editor/reviews/)

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)

 * 1 reply
 * 2 participants
 * Last reply from: [WebFactory](https://wordpress.org/support/users/webfactory/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/getting-syntax-error-when-adding-header/#post-15307032)
 * Status: resolved