Posts

Understanding Sitecore Browser Caching: Validating Media Caching with DisableBrowserCaching

Image
  Caching is an important part of any Sitecore implementation, especially for content-heavy websites where images, videos, JavaScript, CSS, and other media assets are requested frequently. In a Sitecore solution deployed behind a CDN such as Cloudflare, caching can happen at multiple layers: Browser cache Cloudflare/CDN cache Web server/application cache Sitecore media cache Understanding how these layers interact is critical when troubleshooting media performance, cache headers, stale content, or unexpected browser behavior. In this article, we will look at a simple Sitecore configuration change that can be used to validate browser caching behavior for media responses in a UAT environment. The Scenario During troubleshooting of media caching, it may be necessary to determine whether the browser is caching a response based on the headers returned by Sitecore. For example, consider a Sitecore media URL: https://yoursitecorewebsite.com/-/media/project/images/banner.webp When the brow...

Separating Sitecore Audit Logs into a Dedicated Log File in Sitecore 10.4

Image
 Introduction In a Sitecore implementation, application, publishing, and audit messages are often written to the standard Sitecore log files. When troubleshooting or reviewing user activities, finding audit-related entries in a large Sitecore log can become time-consuming. A simple approach to address this is to configure a dedicated Audit Log file that captures Sitecore AUDIT entries separately. This provides a cleaner and more manageable way to review activities such as content updates, publishing, and user actions without having to search through the complete Sitecore log. What is Sitecore Audit Logging? Sitecore generates audit-related log entries for various activities performed within the Sitecore application. For example: AUDIT (sitecore\Admin): Save item: master:/sitecore/content/Home/Sample Item, language: en, version: 1, id: {3ABBD7F1-9C9A-442A-8899-5DE37BFB9B65} This entry provides useful information such as: User who performed the action Action performed Database Item...

SitecoreAI: The Future of Digital Experience and What Every Sitecore Developer Should Know

Introduction The Sitecore ecosystem is experiencing its biggest transformation since the introduction of XM Cloud. With the launch of SitecoreAI, Sitecore has moved beyond traditional content management and personalization into an AI-first digital experience platform. As developers, architects, and marketers, we are no longer building websites alone—we are building intelligent digital experiences powered by AI agents, automation, personalization, and content intelligence. In this article, I will explore what SitecoreAI is, why it matters, and how Sitecore professionals can prepare for this new era. From XM Cloud to SitecoreAI For years, Sitecore focused on delivering enterprise-grade content management and personalization capabilities. The journey evolved as follows: Sitecore XP (Monolithic Platform) XM Cloud (Composable SaaS CMS) Sitecore Stream (Brand-Aware AI Layer) SitecoreAI (AI-First Digital Experience Platform) SitecoreAI brings together content, personalization, customer data, ...

Building a CMS-Agnostic Layout Service Response in Sitecore

Image
Building a CMS-Agnostic Layout Service Response in Sitecore   Introduction In modern headless architectures, frontend teams (especially Next.js) expect clean, predictable, and CMS-agnostic APIs. However, Sitecore Layout Service by default returns: Nested fields.value structures Media, links, and other field types follow Sitecore-specific structures CMS-specific field types This makes frontend consumption complex and tightly coupled to Sitecore. In this blog, I’ll walk through how I built a CMS-agnostic Layout Service response, including solving one of the trickiest problems: 👉 Expanding Multilist fields dynamically with full field data  Problem Statement Sitecore Layout Service provides a powerful way to expose content for headless applications. However, the default response is highly CMS-dependent and not ideal for modern frontend frameworks like Next.js. For example: Fields are wrapped in fields.value Field names are not normalized Media, links, and other fi...

Real-Time Upgrade: JSS 22.6 → 22.10 & Next.js 14 → 15 (Sitecore XP 10.4)

Image
Recently, I upgraded a production-based headless solution running on Sitecore XP  from: JSS 22.6 → 22.10 Next.Js 14 → 15 Instead of blindly upgrading packages, I followed a structured, comparison-based approach. This blog documents the exact real-time steps, commands, issues, and validation checks . Environment Details Backend: Sitecore XP 10.4 Frontend SDK: Sitecore JSS Rendering Host: Next.js Serialization: Sitecore CLI Mode: Headless Upgrading a Sitecore JavaScript Services SDK  application can sound simple — bump versions and install — but in real apps there are a few key steps to get it right. Here’s a real-time upgrade walkthrough based on the official documentation for JSS  Upgrade sitecore offical Why Upgrade? With JSS 22.10 , Sitecore improved compatibility, stability, and updated dependencies — including Next.js. These updates help keep your project secure and aligned with modern frameworks. Step 0 — Before You Begin Pre-checks Confi...

How to Enable Sitecore Analytics on Azure Using ARM Templates

Image
Debugging Sitecore Analytics on Azure: Lessons From a Real Deployment When deploying a Sitecore solution on Azure PaaS, most teams expect Sitecore Analytics to work out-of-the-box—especially when the deployment follows the standard ARM templates or the Sitecore Azure Toolkit. But during one of our recent deployments, we noticed that Sitecore Analytics was not working at all , even though the application was healthy, CD/CM were synced, and the xConnect endpoints were reachable. After investigation, we found the root cause: allowInvalidClientCertificates was not enabled in our ARM template. And enabling this single configuration value instantly fixed Analytics. This blog walks you through the issue, symptoms, root cause, and how re-deploying the ARM template with the correct setting resolved everything. The Problem: Analytics Events Not Being Recorded Even though: xConnect services were up XP roles were able to communicate CM/CD could reach the xConnect endpoint No major...

Configuring Custom Media Domain in Sitecore XP 10 + Next.js

Image
Enabling Custom Domain URLs for Media Files in a Sitecore Headless (JSS + Next.js) Project Recently, while working on a Sitecore XP 10 solution integrated with Next.js (JSS) , I came across a requirement to serve media assets via a custom domain instead of the default Sitecore CM/CD URLs. This is a common scenario when optimizing for performance, SEO, and CDN configurations — especially when you want to serve images from a brand-specific or region-specific domain like https://Customdomain.com instead of the default https://sitecore-cd.azurewebsites.net . Step 1: Define Media Base URL in Next.js In your Next.js environment configuration , add a new variable to define the media domain: NEXT_PUBLIC_MEDIA_BASE_URL= https://Customdomain.com   This allows your front-end components to dynamically resolve Sitecore media URLs from the correct domain at runtime. Step 2: Configure Site Definition in Sitecore Next, you need to update the Sitecore site definition to use the same domai...