Create a custom folder and then create the file:

Edit file and insert the content below:

After adding the required headers, you must regenerate the domain configurations and restart Apache:

Finally, it’s a good idea to hide the PHP version by editing the corresponding php.ini file:

You can check if your score has improved on the website securityheaders.com