How to check if block is empty in page.html.twig
You could preprocess your template 

function mytheme_preprocess_page(&amp;$variables) {
  $block = \Drupal\block\Entity\Block::load('leftblock');
  if ($block) {
    $variables['leftblock'] = \Drupal::entityTypeManager()
      -&gt;getViewBuilder('block')
      -&gt;view($block);
  }
  $block = \Drupal\block\Entity\Block::load('rightblock');
  if ($block) {
    $variables['rightblock'] = \Drupal::entityTypeManager()
      -&gt;getViewBuilder('block')
      -&gt;view($block);
  }
}


Than you can do this in your template

{% if rightblock or leftblock %}
  &lt;h2&gt;{{ 'Block title'|t }}&lt;/h2&gt;
{% endif %}
&lt;div class=""&gt;
  {{ leftblock }}
  {{ rightblock }}
&lt;/div&gt;