Sunday, November 24, 2019

Drupal 8 - How To Resolve Trusted Host Settings Error

Drupal 8

How To Resolve Trusted Host Settings Error

While setting up the Drupal 8 website for My Man The Maker, I started to see these errors in the Administrator GUI:

This led to:
Which led to:

Which, when clicked, led to:

OK, looks like I need to figure out How To Set Up Drupal 8 Trusted Host Settings.  Well, after doing a little reading at (thank you Drupal 8 Documentation Team!), it turned out that resolving this error turned out to be a fast and pretty easy process, for once.  All  I had to do was add some configuration information to the bottom of the settings.php file located that was located in my <drupal_root>/sites/default directory.  Just be sure to remember to register both 

- The Full (i.e.


- The Short (i.e.  

versions of your website URL to avoid seeing this error:

I just added this code to the end of the setttings.php file:

# GL  2019-11-14  This removes the error on the Administration Screen
#                 with respect to TRUSTED HOST SETTINGS
$settings['trusted_host_patterns'] = [

NOTE:  My settings.php file was read-only 

Yours should be too!

To over-write a read-only file in vi, use w! at the colon prompt, and then q to quit, like this:




Then, once the changes to my settings.php file were made, my Drupal 8 TRUSTED HOST SETTINGS error vanished.

Great Success!


No comments:

Post a Comment