Too Excited About the App Router? A Sitecore Migration Story
Part 1: How our excitement about the App Router led to an important lesson about migration strategies.

The Next.js App Router brought some exciting new possibilities to the table.
React Server Components, new routing concepts, improved layouts – plenty of things for frontend developers to get excited about.
And our frontend team certainly was! 😉
But there was something else that caught our attention: Next.js explicitly supports running the Pages Router and App Router side by side.
According to the official Next.js migration guide, you can migrate incrementally from the pages directory to the app directory.
No need to migrate an entire application in one big step.
Sounds pretty good, doesn't it?
And as it turned out, we had just the right opportunity to give it a try.
A Perfect Opportunity
In one of our existing enterprise Sitecore XM Cloud projects, we were about to develop a new feature.
The application was already running on Next.js with the Sitecore Content SDK, using the Pages Router.
So the idea came up: Why not build this new feature with the App Router?
We could keep the existing websites running on the Pages Router while introducing the App Router for the new functionality.
Our frontend developers were familiar with Next.js, and the incremental migration approach was described in the official documentation.
It seemed like a reasonable way to start modernizing the application without touching everything at once.
And I have to admit, I liked the idea too.
A gradual transition, a clearly defined first feature, and an opportunity to gain practical experience with the new architecture.
What could possibly go wrong? 😉
Two Migration Guides. One Overlooked Detail.
Here's where we missed something important.
We had followed the official Next.js App Router migration guide, which explicitly supports running both routers side by side.
But there's also a Sitecore Content SDK migration guide.
And while we were excited about the possibilities described by Next.js, we didn't pay enough attention to the Sitecore-specific migration approach.
After all, we weren't building a plain Next.js application. We were building a Sitecore application using the Content SDK, which brings its own architecture, capabilities, and integration mechanisms into the picture.
What we hadn't sufficiently clarified was whether combining both routers within a single Content SDK application was an officially supported migration scenario.
A rather important detail to overlook. 😉
We Knew There Would Be Changes
Of course, we didn't expect the migration to be as simple as adding an app directory and calling it a day.
The Sitecore migration documentation already described several differences that needed to be addressed.
Localization, for example.
In our case, this meant moving from next-localization to next-intl, with changes to how translations, locale information, and related functionality are handled.
And there were other areas to consider, including component handling, routing, and the application structure.
So yes, we knew there would be some work involved.
What we hadn't fully anticipated was how those changes would interact with the existing Pages Router when both had to keep working within the same application.
Because that's where things became a little more complicated.
When Things Got Interesting. And Not Necessarily in a Good Way.
As implementation progressed, we encountered integration challenges that went beyond the changes we had initially expected.
Localization and redirects behaved differently. Component handling required additional attention. Navigation between the two routers wasn't always straightforward. And multisite routing added another layer of complexity.
Some challenges were clearly implementation-related, while others highlighted the additional complexity of our mixed-router setup.
And suddenly, what had started as a neat incremental migration strategy required quite a few custom adjustments.
To better understand these challenges, we reached out to Sitecore and started reviewing our approach together with their technical team.
At the time of writing, Sitecore Engineering is still reviewing the formal support status of running both routers within a single Content SDK application.
The preliminary guidance is to treat this as a temporary migration state, rather than a long-term target architecture.
So I don't want to jump to conclusions about what is or isn't officially supported.
But the experience has already taught us something valuable.
And since there are several interesting technical details behind these challenges, I'll cover them separately in Part 2, including the issues we encountered, the workarounds we implemented, and the recommendations we've received so far.
For now, let's focus on the bigger lesson.
Lessons Learned – Maybe We Got a Little Too Excited ;-)
Looking back, I think our enthusiasm for the App Router got a little ahead of us.
We saw an exciting new framework feature, found an official migration strategy that seemed to fit our situation, and had a great opportunity to put it into practice.
Nothing particularly unreasonable about that.
But we focused too much on what Next.js supported and not enough on what that meant for the complete Sitecore solution.
And that's my biggest takeaway from this experience:
When working with Sitecore, start with the Sitecore-specific documentation.
The underlying framework documentation is absolutely valuable. But the Content SDK brings additional capabilities, architectural patterns, and integration mechanisms into the picture.
A few things I'll definitely keep in mind next time:
- Start with the Sitecore-specific documentation. Framework documentation is valuable, but it doesn't replace the guidance for the platform you're actually building on.
- When in doubt, ask! If the documentation doesn't explicitly cover your intended architecture, reach out to Sitecore and clarify what's supported before making assumptions.
- Look at the complete picture. Especially in an existing enterprise application, new architectural concepts need to work with everything that's already there.
Wrap-up
Would I still be excited about the App Router?
Absolutely.
Would I still consider an incremental migration?
It depends 😉
If Sitecore Engineering confirms that our approach and workarounds are supported, absolutely.
If not, I'd choose a different migration strategy.
Either way, I'd make sure to validate the approach against Sitecore's recommendations before starting the implementation.\
Because the lesson here isn't that Next.js or the Sitecore Content SDK did something wrong.
It's that working with Sitecore means there's more to consider than Next.js alone.
And sometimes, even a perfectly reasonable idea deserves one more question before you start implementing it.
Preferably before your enthusiasm takes over. 😉
Coming up in Part 2: A closer look at the technical challenges of running Pages Router and App Router side by side in a Sitecore Content SDK application – from localization and Component Maps to navigation and multisite routing.
And hopefully, there will be a Part 3 as well, once we have Sitecore Engineering's official assessment and recommendations.
Stay tuned!
Comments
Join the discussionNo comments yet. Be the first to comment.





