How can I exclude certain routes from maintenance mode?
You need to override the service directly.
mymodule.services.yml
services:
  maintenance_mode: # same ID as declared in core.services.yml
    class: Drupal\mymodule\Services\CustomMaintenanceMode # point to your class
    arguments: ['@state']

mymodule/src/Services/CustomMaintenaceMode.php
&lt;?php

namespace Drupal\mymodule\Services;

use Drupal\Core\Session\AccountInterface;
use Drupal\Core\Site\MaintenanceMode;

class CustomMaintenanceMode extends MaintenanceMode {

  /**
   * {@inheritdoc}
   */
  public function exempt(AccountInterface $account) {
    $node = \Drupal::routeMatch()-&gt;getParameter('node');
    if ($node instanceof \Drupal\node\NodeInterface &amp;&amp; $node-&gt;getType() == 'article') {
      return TRUE;
    }
    else {
      return $account-&gt;hasPermission('access site in maintenance mode');
    }
  }

}