drupal 9 get bqse url fronm site code example Example: drupal 8 get site base url $host = \Drupal::request()->getSchemeAndHttpHost();