---
title: "Tips & Tricks for Migrating to Router 2.0"
description: "Heroku Router 2.0 is generally available and is expected to become the default, making migration planning important before rollout. The guidance recommends creating a staging application, enabling the http-routing-2-dot-0 feature, restarting web dynos when needed, and checking response headers and system logs to confirm routing. Router 2.0 identifies requests with Via values such as “2.0 heroku-router” or “1.1 heroku-router,” and its logs add protocol, tls, and tls_version fields. HTTP/2 is enabled by default on custom domains with valid TLS certificates, while HTTP/2 can be disabled through a Labs feature. Keepalives are also enabled between the router and web dynos, but applications using recent Puma versions may need the keepalive opt-out because of a connection-handling bug."
---

# Tips & Tricks for Migrating to Router 2.0

[Heroku](https://yomu.fyi/company/heroku) · Agne · Nov 21, 2024

**Type:** Tutorial

## Summary

Heroku Router 2.0 is generally available and is expected to become the default, making migration planning important before rollout. The guidance recommends creating a staging application, enabling the http-routing-2-dot-0 feature, restarting web dynos when needed, and checking response headers and system logs to confirm routing. Router 2.0 identifies requests with Via values such as “2.0 heroku-router” or “1.1 heroku-router,” and its logs add protocol, tls, and tls\_version fields. HTTP/2 is enabled by default on custom domains with valid TLS certificates, while HTTP/2 can be disabled through a Labs feature. Keepalives are also enabled between the router and web dynos, but applications using recent Puma versions may need the keepalive opt-out because of a connection-handling bug.

## Context

Router 2.0 is generally available and is set to become the default router. The migration guidance addresses validating applications in staging, confirming which router handles traffic, and identifying compatibility issues before the broader rollout.

## Approach / What changed

Create a staging application that closely mirrors production, enable Router 2.0 with the Heroku CLI, restart web dynos if connections to the legacy router affect response times, and verify routing through HTTP headers and system logs. Test HTTP/2 and keepalives, disabling either with the documented Labs features when an application requires it.

## Takeaways

- HTTP/2 terminates at the Heroku router, which forwards HTTP/1.1 to the application; HTTP/2 support applies to custom domains, not the built-in herokuapp.com domain.
- Router 2.0 log entries use protocol values such as http2.0 and http1.1 and can include tls and tls\_version fields, unlike the legacy router’s https or http values.
- Recent Puma versions can show significantly longer tail request latencies with Router 2.0 keepalives enabled; the http-disable-keepalive-to-dyno Labs feature provides an opt-out.

**Tags:** [Heroku](https://yomu.fyi/topic/heroku), [Performance](https://yomu.fyi/topic/performance), [TLS](https://yomu.fyi/topic/tls)

- Source: [Heroku](https://www.heroku.com/blog/tips-tricks-router-2dot0-migration)
- Source URL: https://www.heroku.com/blog/tips-tricks-router-2dot0-migration
- Ingested by Yomu: 2026-09-10T00:04:51.301Z

[Read original post](https://www.heroku.com/blog/tips-tricks-router-2dot0-migration)
