Removing a Page from Your Site
When you no longer want a page to be live, you do not need to delete any files or manually remove it from your CDN. You can mark it as "not found" in its data handler, and Streak will take care of removing it for you the next time a build runs.
How to Remove a Page
Open the data handler for the page you want to remove and return notFound: true:
export default async function handler() {
return {
notFound: true,
};
} That is the only change needed. You do not need to remove the page from your sitemap or touch any other file.
What Happens Next
- You publish your site as normal.
- During the build, Streak detects that the page is marked as not found.
- Once the build completes, Streak automatically removes the page from your CDN.
- Visitors who navigate to that URL will no longer see the page.
Note: The page is removed from your live site only after a successful publish. It remains live until that build completes.
When to Use This
- A blog post or landing page that you want to take down permanently.
- A campaign page that has ended.
- Any page that should no longer be publicly accessible.
Once a page is removed from the CDN, you can safely delete its handler, widget, and layout files from your project at any time — or leave them in place if you think you might bring the page back later.