cancel
Showing results for 
Search instead for 
Did you mean: 
Go to solution

Drupal: The trusted_host_patterns setting is not configured in settings.php

After installing Drupal I get the following error:

 

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. See Protecting against HTTP HOST Header attacks for more information.
 
I tried updating the settings.php file, but I don't have permissions. I set the permissions to 0666, just to make sure, yet I still don't have permission.
 
Please help.
3 REPLIES 3
Moderator
Moderator

Re: Drupal: The trusted_host_patterns setting is not configured in settings.php

Was this Drupal 8 that you installed?  Did you follow all of the steps outlined in this article? https://www.godaddy.com/help/how-to-install-drupal-8-beta-on-cpanel-hosting-12394.  

 

If you're still seeing that error after confirming all those steps were completed, please reach out to our live support teams so we can investigate this in more detail.  Thanks!

 

MPC

Re: Drupal: The trusted_host_patterns setting is not configured in settings.php

I am receiving the same error. I have permission to all my files... I just don't know what to do.

Your link does not work, and I have failed to find anything on godaddy.com relating to this error.

 

Is there a guide to adjusting the code in settings.php other than the guide on drupal.com?

Please send help.

Community Manager
Community Manager
Solution

Re: Drupal: The trusted_host_patterns setting is not configured in settings.php

Hi @Sheezle. Welcome to GoDaddy Community! It looks like that link is fairly old.  Since that response, the article has been removed. I'm not sure why though. I'm not aware of any guides specific to settings.php on our Help Center or Community, but I did find this Drupal post that might be helpful. 

 

I was able to install Drupal 8.5 using the Installatron service included with cPanel. You may want to try that if you are having difficulty installing it manually. 

 

JesseW - GoDaddy | Community Manager | 24/7 support available at x.co/247support | Remember to choose a solution and give kudos.