title: Drupal8: how to fix the error on trusted host setting?
body: <p>I have error in configuration using Drupal8 as below:</p>
  
  <p>TRUSTED HOST SETTINGS
  Not enabled
  The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. </p>
  
  <p>I’ve fixed this error locally put code on local setting.php:</p>
  
  <p>$settings['trusted_host_patterns'] = array(
     '^drupal-8-2-6.dd$',
      '^localhost',
    );</p>
  
  <p>But I could not fix this error on  hosting setting.php even so I’ve tried different attempts  as below
  (assuming that sf- my domain and dr31 –is side, 
  so internet access is www.dr31.sf.com):</p>
  
  <p>$settings['trusted_host_patterns'] = array(
    '^www.dr31.sf.com$',
  );</p>
  
  <p>$settings['trusted_host_patterns'] = array(
    '^www.dr31.sf.com$',
  );</p>
  
  <p>$settings['trusted_host_patterns'] = array(
    '^www.sf.com$',
  );</p>
  
  <p>Is it possible that some hosting settings prevent to make effect of its setting.php and as the result it creates the trusted hosts error?</p>
  
  <p>For ex. permission on setting php.not 644 but 444 and even I've changed it on 644 in come back to 444. </p>
  
  <p>I, personally don't think that this has any affect on trusted host error.
  But why could not I get rid from error on hosting if I followed the same pattern as on local host where is no error?</p>
  
  <p>How to fix the error of trusted host setting?</p>
  
  <p>Thanks.</p>
  
  <p>I've tried to change as suggested(see below) but it doesn't fix error:</p>