Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

You must login to ask a question.

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

WebPro Care Latest Articles

How to add Security Headers to your site

This article will explain how you can add Security Headers in Apache. Security headers can be added directly to the .htaccess file of your site. The .htaccess file is typically located in the webroot of your site. A common location in Servebolt would be in the /public/ directory. You can access the .htaccess file by logging into your site using either SFTP or SSH. Editing the .htaccess file should be done by a more technical person, adding a rule wrongly may result in a 500 Internal Server Error. Adding the wrong Security Header to your site may also lead to some functionality not working as expected.

Adding Security Headers:

Security Headers can be added to your .htaccess file. The .htaccess file is parsed from top to bottom, so it is important that you keep that in mind when adding Security Headers.

Example:

The Security Headers added below are only an example of how it can look it on your .htaccess file. Use wisely and only add Security Headers to your site if you know what they do.

# Security Headers
<IfModule mod_headers.c>
Header set Content-Security-Policy "upgrade-insecure-requests"
Header set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header set X-Xss-Protection "1; mode=block"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-Content-Type-Options "nosniff"
Header set Referrer-Policy "strict-origin-when-cross-origin"
Header set Permissions-Policy "geolocation=self"
</IfModule>

Related Posts

Leave a comment

Latest News & Updates

WebPro Care Latest Articles

The 8 Best Bike Seats of 2024: Top Choices for Comfort and Performance

The 8 Best Bike Seats of 2024: Top Choices for Comfort and Performance

Explore the 8 best bike seats of 2024, featuring options that balance comfort and performance. Upgrade your ride with these highly recommended seats for a smoother cycling experience.

The 5 Best Electric Commuter Bikes of 2024

The 5 Best Electric Commuter Bikes of 2024

The 5 Best Electric Commuter Bikes of 2024 We tested electric bikes from Aventon, Ride1Up, Lectric, Rad Power, Blix, and others to find the best We tested the bikes in this review head to head to find the best. Credit: ...

The 4 Best Bike Work Stands of 2024: Sturdy Support for Easy Maintenance

The 4 Best Bike Work Stands of 2024: Sturdy Support for Easy Maintenance

Discover the top 4 bike work stands of 2024, designed to provide stability and convenience for all your repair and maintenance needs. Find the perfect stand for your workshop today.

Best Bikes of 2024

Best Bikes of 2024

Best Bikes of 2024 Looking for a bike? We’ve researched and tested hundreds, from Ride1Up to Specialized to Blix, and more We’ve put hundreds of bikes through rigorous WebProCare testing to find the very best. Credit: Abriah Wofford By Joshua ...

The 15 Best Electric Bikes of 2024

The 15 Best Electric Bikes of 2024

The 15 Best Electric Bikes of 2024 We chose the top e-bikes for commuting, recreation, and more; here are our best recommendations. Credit: Abriah Wofford Our Top Picks Ride1Up 700-Series Best Overall Electric Bike Ride1Up Turris XR Best Bang For ...

The 6 Best Bike Multi-Tools of 2024: Compact Solutions for On-the-Go Repairs

The 6 Best Bike Multi-Tools of 2024: Compact Solutions for On-the-Go Repairs

Discover the 6 best bike multi-tools of 2024, designed to provide all-in-one solutions for quick and easy repairs while you’re out on the road. Stay prepared with these top picks.

Explore Our Blog