I have an issue where I'm trying to make it a "Trusted host patterns" on settings.php. It gets an issue of "The provided host name is not valid for this server."

I have tried many times to get it to work, the issue work with:

$settings['trusted_host_patterns'] = array(

But will not get the following to work

$settings['trusted_host_patterns'] = array(


enter image description here


1 Answer 1


According to your screenshot, your hostname is localhost, not sandbox.dev, so the correct regex would be ^localhost$

Not the answer you're looking for? Browse other questions tagged or ask your own question.