---
title: "Layout forces dynamic rendering (data/force-dynamic-layout)"
description: "`dynamic = \"force-dynamic\"`, `revalidate = 0` or `fetchCache = \"force-no-store\"` in a layout opts every page below it out of static rendering and the data cache."
url: http://localhost:4173/rules/data/force-dynamic-layout
updated: 2026-11-11
---

# Layout forces dynamic rendering

> `data/force-dynamic-layout` is a vetd rule. It flags: Layout forces dynamic rendering. It runs on every `check`, together with the TypeScript check.

| Fact | Value |
| --- | --- |
| Rule id | `data/force-dynamic-layout` |
| Severity | warning |
| Group | Data fetching |
| Tags | performance, nextjs-16 |

## Why it matters

`dynamic = "force-dynamic"`, `revalidate = 0` or `fetchCache = "force-no-store"` in a layout opts every page below it out of static rendering and the data cache.

## How to fix it

Move the segment config to the pages that need per-request rendering, or read cookies()/headers() only where needed.

## Credit

Based on work by:

- [Next.js team](https://nextjs.org): Route segment config dynamic = 'force-dynamic' on a layout opts every route beneath it out of static rendering.

## References

- [Route Segment Config](https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config), Next.js
- [Caching](https://nextjs.org/docs/app/getting-started/caching), Next.js

## Related rules

- [`next/segment-config`](http://localhost:4173/rules/next/segment-config.md)
- [`data/uncached-fetch`](http://localhost:4173/rules/data/uncached-fetch.md)

## Get this text from vetd

MCP: call `explain` with `{ "diagnosticId": "data/force-dynamic-layout" }`. CLI: `npx vetd explain data/force-dynamic-layout`.

---

[All 92 rules](http://localhost:4173/rules.md) · Previous: [`data/no-loading-boundary`](http://localhost:4173/rules/data/no-loading-boundary.md) · Next: [`data/uncached-fetch`](http://localhost:4173/rules/data/uncached-fetch.md)
