---
title: "Discussion on \"HSTS preload on Vercel: why the apex redirect ignored my header\" | Hashnode"
description: "Discussion on \"HSTS preload on Vercel: why the apex redirect ignored my header\". Next.js headers() set HSTS with includeSubDomains and preload, but the Vercel apex-to-www domain redirect still sent max-age only."
url: "https://hashnode.com/posts/hsts-preload-on-vercel-why-the-apex-redirect-ignored-my-header/6af44fd478e8ff11895dad77"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [HSTS preload on Vercel: why the apex redirect ignored my header](https://mohamedgado.hashnode.dev/hsts-preload-on-vercel-why-the-apex-redirect-ignored-my-header?utm_source=hashnode&utm_medium=feed)

Next.js headers() set HSTS with includeSubDomains and preload, but the Vercel apex-to-www domain redirect still sent max-age only.

7h ago · 6 min read · mohamedgado.hashnode.dev  
Read the article

-   [#vercel](https://hashnode.com/tag/vercel)
-   [#nextjs](https://hashnode.com/tag/nextjs)
-   [#security](https://hashnode.com/tag/security)
-   [#web-development](https://hashnode.com/tag/web-development)

## Written by

[Mohamed Gado](https://hashnode.com/@mohamedgado)

@mohamedgado · Tanta, Egypt

  
[View profile](https://hashnode.com/@mohamedgado)

Senior Software Engineer · React, Next.js, React Native · Building Masareef & Rafiq

Senior Software Engineer with 6+ years building web and mobile products in React, Next.js and React Native. I build and ship Masareef and Rafiq on my own. Originals live at mohamedgado.com/writing.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
