title: How do I scope my website cookies to a Fully Qualified Domain Name on my PHP web application
body: <p>The pent test on our PHP web application yielded a "Loosely Scoped Cookie" alert. The suggested solution is "Always scope cookies to a FQDN (Fully Qualified Domain Name)."</p>
  
  <p>We used Laravel 4 to build the web application. I inserted a code on the view file, main.blade.php to set the cookie to our domain. The code is listed below:</p>
  
  <pre><code>ini_set('session.cookie_httponly', 1);
  ini_set('session.cookie_secure', 1);
  ini_set('session.cookie_domain','johndoe.abc.com'); //johndoe is a sub domain of abc.com
  </code></pre>
  
  <p>After I added the codes, the pent test still yielded the same result. How do I set the scope of my website cookies to the domain?</p>