The Server Side Rendering (SSR) approach is particularly recommended for businesses with an existing SSR setup and who may not be able to adopt the additional infrastructure required for SSR + Edge. While SSR + Edge remains the ideal choice for high-traffic environments and real-time personalization, SSR serves as the second-best option, delivering strong SEO, dynamic content capabilities, and efficient personalization without the need for edge infrastructure.

Contentstack Personalize offers flexibility and freedom in implementation, by being API-first and tech-stack agnostic. As long as you can make API calls to Contentstack, you can use Personalize. This document outlines the SSR architecture, focusing on how it handles personalized content delivery using both Personalize Edge API and Contentstack Delivery API.
The SSR architecture is a balanced choice for businesses seeking dynamic personalization alongside strong SEO performance and efficient content delivery when adopting Edge infrastructure is not feasible. By managing all personalization from the origin server, this approach makes it particularly well-suited for businesses with moderate traffic, offering a simpler yet effective solution for delivering dynamic, personalized user experiences.
Note: While SSR is an effective solution for personalized content delivery, SSR + Edge offers additional benefits for all businesses. By retrieving visitor’s variants at the edge, it enables real-time personalization and allows easier caching of personalized content. Additionally, it reduces latency and eases the load on the origin server, ensuring faster response times and improved scalability. For more details on this approach, refer to the SSR + Edge documentation.
Note: This document provides a high-level overview. For details on how to use Personalize and other best practices, refer to Contentstack's official documentation and consult with our support team.
This architecture offers multiple benefits. Below we have listed some of the important ones:
This architecture ensures that the Personalize Edge API is responsible for making personalization decisions about which variants are to be shown to a user. When using Personalize Edge SDK, personalizations will be updated on every new session or refresh using the reset(). This allows displaying the latest personalized content to the user based on updated personalization context. For instance, if a user attribute is updated just before visiting a page, it will affect the content displayed.
However, achieving true real-time personalization requires careful implementation. Since caching mechanisms like the custom cache layer or CDN cache may store personalized pages, it’s important to ensure the cache is revalidated after a set period of time. These rules define how long personalized content remains valid in the cache before it needs to be refreshed from the origin server. Without such measures, the content served may be stale and not reflect the latest active variants for the user.
This setup ensures that while content is personalized and cached for the user, there is a system in place to periodically refresh cached variants, balancing performance with dynamic personalization needs.
Traditional personalization implementations work entirely in the browser by injecting a JavaScript script in the front-end code. The non-personalized webpage loads along with the script, which then gathers the context about the user, makes API calls, and then replaces or injects personalized content directly into the HTML. This means that until the script completes its process, the user is seeing either non-personalized content or a loading screen. Once the appropriate personalized content is determined, it is then suddenly injected into the page, causing flickers as non-personalized content is abruptly replaced with personalized content.
However, with the SSR approach, this problem is eliminated. The page that initially loads in the user’s browser is already personalized, based on the latest available context about the user and the experiences defined by you. This provides the smoothest possible experience for users.
As the website (with and without personalization) is server-side rendered, it generates fully rendered HTML pages making it easier for search engines to crawl and index the pages of your website.
This SSR architecture requires minimal code changes on the front-end, with most of the personalization logic managed server-side. For each request, the server retrieves user-specific variants and delivers them as part of the CMS content, allowing you to maintain a single content-rendering approach for both personalized and base content. Event tracking may require minor client-side adjustments but can also be managed through Google Tag Manager or similar tools.
With SSR, personalization decisions are requested from the origin server. This means every time you wish to display updated personalized content to your user, the requests have to be served from the origin server. This may lead to increased traffic to your origin. To scale effectively, this architecture can use CDN caching for static or less frequently used personalized content. However, without edge distribution, heavy loads on the origin server should be carefully managed to avoid potential performance impacts and ensure fast content delivery.
In an SSR architecture with basic CDN caching, the CDN stores rendered pages to reduce the load on the origin server, ensuring fast response times for repeated requests.
When adding personalization, the request will include user-specific variants, ensuring each user receives content tailored to them. However, with basic CDN caching, the same page is stored for all users, meaning personalized content is not considered.
To address this, you need to implement a custom cache layer that can manage personalized content. This layer should differentiate between user-specific variants by including variant data in the cache key.
This change impacts your current caching logic because different users will need to see different content. The cache layer must store pages based on unique variants, and you’ll need to update the cache configuration to support these dynamic, variant-specific pages. This ensures personalized content is correctly stored and served.
To update the caching logic, adjust how the cache key is generated. Instead of caching a single version of the page, the cache key should incorporate user-specific attributes, such as user ID or session data. This creates distinct cache entries for different user variants, ensuring that each user sees their personalized content. Additionally, you’ll need to configure time-to-live (TTL) values for personalized content to keep it fresh, while also optimizing cache hit rates.
When implementing the new caching logic, several important considerations should be kept in mind:
By carefully managing these aspects, your caching logic will effectively support personalized content while maintaining optimal performance.
The following are the key components of this implementation architecture:
We recommend using the JavaScript Edge SDK, which handles communicating with the Edge API and providing it with the required context on your behalf.
Let’s discuss how the components in the architecture work—in sequence—to deliver a personalized experience to your visitors when they visit your website.

The diagram visually represents this flow:

The diagram visually represents this flow:
Note: The cached web pages might contain older or out-of-date variant content, as the Personalize Edge API was called only once, from your origin. To ensure visitors see the most up-to-date personalized content, it is essential to implement some cache revalidation logic.