Help with some htaccess code hosts have added
Posted: Thu Sep 29, 2022 8:54 am
Hopefully someone with a bit more knowledge than me may have the answer to this. I have googled the life out of it, and it does appear to be something that is done.
I have had a few customers report that Malwarebytes is reporting my website as unsafe and compromised. The report included an IP address which I think was for the server not the website in particular.
I contacted the hosts about this. At first, in typical host fashion, the hosts would not agree that there was a problem and pointed me to another site where the report showed the server as being clean and safe. After a bit of going backwards and forwards they added a line of code to the htaccess file in the root. This is what they added
I have never had anything like this in that file before. Is this something that needs doing and is safe to do, or is it more of a sticking plaster to cover a problem.
I have had a few customers report that Malwarebytes is reporting my website as unsafe and compromised. The report included an IP address which I think was for the server not the website in particular.
I contacted the hosts about this. At first, in typical host fashion, the hosts would not agree that there was a problem and pointed me to another site where the report showed the server as being clean and safe. After a bit of going backwards and forwards they added a line of code to the htaccess file in the root. This is what they added
Code: Select all
Header always set Content-Security-Policy: upgrade-insecure-requests