How not render a region on specific page programmatically on Drupal 8 I put a custom block (develop for me) on sidebar first region for every page, every fine, but I want that this block not render on the home page.

On my module, I made this:

funtion mymodule_preprocess_page(&amp;$variables) {
  if ($variables['is_front']) {
    unset($variables['page']['sidebar_first']);
  }
}


The sidebar not show, but the block already was rendered (I debug this code and the build function of my block was called before of mymodule_preprocess_page function). Then how I programmatically avoid that this block not render.
Got to /admin/structure/block on your domain. Click the configure button beside your block. In the lower part of the configuration form you have a section called visibility. One of the tabs in this section is labelled pages. This is where you configure where the block is permitted or forbidden to be rendered. In your case one would write &lt;front&gt; and choose the radio button labelled "Hide for the listed pages".