Drupal Error, Name is not valid for this server. | Drupal 8

Drupal Error, Name is not valid for this server.

Submitted by editor on Mon, 11/23/2015 - 10:08
Question

I have this message, "The provided host name is not valid for this server." What can i do ?

This is due to trusted host configuration of the serveur. It can produce when you change the domain name or 'trusted_host_patterns'. To resolve the probleme, add your new domain to the DRUPAL_ROOT/sites/SITE_FOLDER/settings.php (Ex: sites/defaults/settings.php)

Exemple : Domain name = newdomain.com
$settings['trusted_host_patterns'] = array(
  '^newdomain.com\.loc$',
  '^www\.newdomain.com\.loc$',
);

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.