How to change the /blog URL path
Read time: 1 minute
- Mitchell Christ

Creating a website with a blog is effortless with SanityPress. Out of the box, the blog homepage and individual posts are organized under the /blog
URL path.
But what if "blog" doesn’t align with your vision? No problem—customizing it to fit your needs is a breeze with a few tweaks to your SanityPress codebase.
In this guide, we’ll walk you through the steps to update the blog’s URL path. For this example, we’ll show you how to change /blog
to /press
. Let’s dive in!
1 File to update:¶
src/lib/env.ts
// line 14
- export const BLOG_DIR = 'blog'
+ export const BLOG_DIR = 'press'
1 Folder name to update:¶
Lastly, we want to change the folder name that handles the Next.js routing for the blog pages:
- src/app/(frontend)/blog/*
+ src/app/(frontend)/press/*
Let us know below if you'd like further refinements!
