
Redirect a Default Vercel Subdomain to Your Custom Domain
When you set up a custom domain in Vercel, the default `vercel.app` subdomain still serves your site, which can lead to duplicate content. Here's how to fix it.
Articles
Next.js is an open‑source React framework created by Vercel. It is used to build fast, scalable websites and web applications, combining React with routing, data fetching, API routes, automatic code splitting, TypeScript support, server‑side rendering (SSR), and static site generation (SSG).
Below you will find a subset of articles from my blog specifically about Next.js as well as Next.js platform consulting. This is an area I have worked with for many years, and it has been a regular subject in my writing. There are fifty‑eight articles collected together for you below.

When you set up a custom domain in Vercel, the default `vercel.app` subdomain still serves your site, which can lead to duplicate content. Here's how to fix it.

Middleware in Next.js provides a straightforward way to protect routes and manage user authentication. Here, I show how to implement effective route protection.

Why static generation became more complex as CMS previews, ISR, cache invalidation, build queues, e‑commerce data, and platform expectations grew.

Next.js vs. Remix compared properly, across routing, data loading, mutations, caching, and the architectural trade‑offs teams actually feel in production.

Caching strategies for data fetching in Next.js, including force‑cache, revalidation, stale data trade‑offs, and the debugging traps teams hit in production.

Whilst replatforming an app, I came across this limitation in Next.js: you cannot (easily) access search parameters in an SSR layout. Here, I share my solution.

A practical guide to implementing authentication in Next.js with NextAuth.js, including sessions, callbacks, route protection, and router‑specific trade‑offs.

Websites have not been set‑and‑forget for a long time now, and without the technical know‑how to update a static site, CMSes are a key part of web development.
Fix window is not defined in Gatsby or Next.js by understanding SSR, guarding browser globals, lifecycle timing, dynamic imports, and third‑party modules.

How Incremental Static Regeneration affects CMS publishing freshness, including rebuild timing, stale pages, previews, and editorial expectations.

Preview Mode in Next.js explained with a headless CMS, draft content workflows, preview cookies, and how editors can see unpublished pages safely.

p Tags from Contentful List ItemsOne of the quirks of rendering Rich Text from Contentful is that list items come wrapped in paragraph <p> tags. Fortunately, this is a simple one to resolve.

next/image`next/image` explained with responsive sizing, lazy loading, layout shift reduction, and why image optimisation matters in real Next.js applications.

Dynamic imports and code splitting in Next.js explained with `next/dynamic`, lazy‑loaded components, SSR trade‑offs, and when splitting really helps.

getStaticPaths in Next.js`GetStaticPaths` in Next.js explained with dynamic routes, pre‑rendered paths, fallback behaviour, and how static generation works for slug‑based pages.

getStaticProps with CMS DataUse getStaticProps with CMS data without hiding freshness, build‑time, preview and validation risks in Pages Router content workflows.

getStaticProps vs. getServerSideProps in Next.js`GetStaticProps` vs. `getServerSideProps` in Next.js explained with build‑time and request‑time data fetching, trade‑offs, and practical page examples.

Compare static generation and server‑side rendering in Next.js through freshness, request‑time data, performance, SEO, operational cost, and page intent.