Trusted Host Settings Not enabled In the settings.php file if the site, I added the following line.

$settings['trusted_host_patterns'] = array(
  '^www\.example\.com$',
);  


I'm using Drupal 8.2.6.

Do I need to add the proxy address too, or my IP? It is a single domain.
Every entry in the array contains a RegEx. So you must escape the dot too.

$settings['trusted_host_patterns'] = array( '^www\.example\.com$' );


This will match the exact the host "www.example.com".