Fix 'The provided host name is not valid for this server' Issue

This issue is caused by entering the wrong host name pattern in trusted hosts section in settings.php

You can find this section by opening your sites/default/settings.php file, then find $settings['trusted_host_patterns']

To fix this issue you need to type the correct pattern for your site url, you can follow the samples marked below

I hope this helps you fix this issue, looking forward to help you do more with Drupal

Share this post