{"id":18721,"date":"2026-09-23T04:37:14","date_gmt":"2026-09-23T04:37:14","guid":{"rendered":"https:\/\/www.hostinger.com\/support\/?p=18721"},"modified":"2026-09-23T04:37:14","modified_gmt":"2026-09-23T04:37:14","slug":"how-hostinger-cdn-caching-works","status":"publish","type":"post","link":"https:\/\/www.hostinger.com\/support\/how-hostinger-cdn-caching-works\/","title":{"rendered":"How Hostinger CDN caching works"},"content":{"rendered":"<p><a href=\"https:\/\/www.hostinger.com\/support\/7935917-hostinger-cdn-website-optimization\/\">Hostinger CDN<\/a> caches copies of your website&rsquo;s files on servers close to your visitors and serves them without contacting your hosting server. Static files are cached automatically, HTML pages are cached only when your website asks for it, and requests that belong to a logged-in visitor or a shopping cart are never served from the cache. Knowing these rules explains why a change appears immediately in one place and later in another.<\/p><h2 id=\"h-what-hostinger-cdn-caches\">What Hostinger CDN caches<\/h2><div class=\"intercom-interblocks-table-container\">\n<table role=\"presentation\">\n<tbody>\n<tr>\n<td style=\"background-color: #e3e7fa80;width: 261px\">\n<p class=\"intercom-align-center no-margin\"><b>Content<\/b><\/p>\n<\/td>\n<td style=\"background-color: #e3e7fa80\">\n<p class=\"intercom-align-center no-margin\"><b>Cached at the CDN edge<\/b><\/p>\n<\/td>\n<td style=\"background-color: #e3e7fa80\">\n<p class=\"intercom-align-center no-margin\"><b>Default duration<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Static files: images, CSS, JavaScript, fonts, downloads<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">Yes<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Up to 2 hours, or the time set by your website&rsquo;s cache headers<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Optimized images (WebP, resized)<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">Yes<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Up to 30 minutes by default on web hosting, or the time set by the original image&rsquo;s cache headers<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">HTML pages on web hosting (WordPress, PHP, Node.js)<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">Only when marked cacheable by your website<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">The time your website or caching plugin specifies<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Website Builder and Horizons websites<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">Yes, the whole website<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Up to 7 days; refreshed when you publish<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Redirects (301, 302) and not-found (404) responses<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">Yes, briefly<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">301 up to 2 hours; 302 up to 20 minutes; 404 a few seconds for pages and a few minutes for files<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Pages for logged-in visitors, carts, and checkouts<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">No<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">&mdash;<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"no-margin\">Error responses (5xx)<\/p>\n<\/td>\n<td>\n<p class=\"intercom-align-center no-margin\">No<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Never stored; a copy cached earlier may be served instead while your website returns errors<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div><p>Static files are cached with a default lifetime of two hours when your website sends no <code>Cache-Control<\/code> or <code>Expires<\/code> header. The Content Delivery Network (CDN) follows the header when it does &mdash; <code>s-maxage<\/code> applies to the CDN, <code>max-age<\/code> to both the CDN and browsers. See <a href=\"https:\/\/www.hostinger.com\/support\/8052370-advanced-cdn-header-management-at-hostinger\/\">Advanced CDN header management at Hostinger<\/a> for the directives.<\/p><p>Because redirects are cached too, a redirect you have already corrected can keep being served from the edge for up to two hours. <a href=\"https:\/\/www.hostinger.com\/support\/hostinger-cdn-how-to-clear-the-cache\/\">Flush the CDN cache<\/a> after changing redirects.<\/p><h2 id=\"h-how-html-pages-are-cached-on-web-hosting\">How HTML pages are cached on web hosting<\/h2><p>Hostinger CDN fetches HTML pages from your hosting server on every request by default and reports them as DYNAMIC in the <code>x-hcdn-cache-status<\/code> header. Two things make the CDN cache a page.<\/p><p>The LiteSpeed Cache plugin caches the page for the plugin&rsquo;s public cache lifetime (the plugin default is 7 days, <code>max-age=604800<\/code>) when it marks a page as publicly cacheable, and Hostinger CDN usually clears its cached pages when the plugin purges. Lowering <strong>Default Public Cache TTL<\/strong> in the plugin applies to pages cached afterwards; <a href=\"https:\/\/www.hostinger.com\/support\/hostinger-cdn-how-to-clear-the-cache\/\">flush the CDN cache<\/a> to apply it to pages already cached.<\/p><p>Cache headers from your application are cached for that time when a response carries <code>Cache-Control: public<\/code> with a <code>max-age<\/code> or <code>s-maxage<\/code> value. <code>Cache-Control: private<\/code>, <code>no-store<\/code>, or <code>no-cache<\/code> keeps the page out of the CDN cache.<\/p><p>Requests carrying a WordPress login cookie or a WooCommerce cart or session cookie bypass the cache entirely, so logged-in users, customers with items in the cart, and the checkout always receive fresh pages from your server.<\/p><p><strong>NOTES<\/strong><\/p><ul>\n<li>A long <code>max-age<\/code> also instructs browsers to keep the page. Visitors who see an old version after a flush usually have the page in their browser cache &mdash; a hard refresh (Ctrl+Shift+R, Cmd+Shift+R on Mac) confirms it.<\/li>\n<li>Responses with <code>x-hcdn-cache-status: HIT<\/code> also carry an <code>Age<\/code> header with the number of seconds since the CDN stored the copy.<\/li>\n<\/ul><h2 id=\"h-how-to-read-the-cache-status\">How to read the cache status<\/h2><p>Every response delivered by Hostinger CDN includes the <code>x-hcdn-cache-status<\/code> header.<\/p><div class=\"intercom-interblocks-table-container\">\n<table role=\"presentation\">\n<tbody>\n<tr>\n<td style=\"background-color: #e3e7fa80;width: 261px\">\n<p class=\"intercom-align-center no-margin\"><b>Status<\/b><\/p>\n<\/td>\n<td style=\"background-color: #e3e7fa80\">\n<p class=\"intercom-align-center no-margin\"><b>Meaning<\/b><\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">HIT<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Served from the CDN cache<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">MISS<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Fetched from your website and stored for the next request<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">EXPIRED<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">The cached copy expired; fetched again and stored<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">REVALIDATED<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Your website confirmed the cached copy is still current<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">DYNAMIC<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Not cacheable; fetched from your website<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">BYPASS<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">Cache skipped, for example in Development mode or for a logged-in visitor<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">STALE<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">A cached copy served because your website was unavailable or returned an error<\/p>\n<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 261px\">\n<p class=\"intercom-align-center no-margin\">UPDATING<\/p>\n<\/td>\n<td>\n<p class=\"no-margin\">A cached copy served while the CDN refreshes it from your website in the background<\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div><p>The first request for a page or file after a flush shows MISS or DYNAMIC even when the response was stored &mdash; repeat the request and check for HIT before concluding that something is not cached.<\/p><h2 id=\"h-how-to-refresh-cached-content\">How to refresh cached content<\/h2><ol>\n<li><a href=\"https:\/\/www.hostinger.com\/support\/hostinger-cdn-how-to-clear-the-cache\/\">Flush cache<\/a> in <strong>Hostinger dashboard &rarr; Websites &rarr; Dashboard &rarr; Performance &rarr; CDN<\/strong> invalidates the cached copies of the whole website within seconds. Individual URLs cannot be flushed separately.<br>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-16211\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-39.png\" alt=\"\" width=\"1173\" height=\"366\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-39.png 1173w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-39-300x94.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-39-1024x320.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-39-768x240.png 768w\" sizes=\"(max-width: 1173px) 100vw, 1173px\" \/><\/li>\n<li>Development mode makes the CDN fetch every request from your website while you edit. Disable it afterwards.<br>\n<img decoding=\"async\" class=\"alignnone size-full wp-image-16194\" src=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21_3.png\" alt=\"\" width=\"1171\" height=\"364\" srcset=\"https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21_3.png 1171w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21_3-300x93.png 300w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21_3-1024x318.png 1024w, https:\/\/www.hostinger.com\/support\/wp-content\/uploads\/sites\/55\/2026\/08\/2026-08-20_09-21_3-768x239.png 768w\" sizes=\"(max-width: 1171px) 100vw, 1171px\" \/><\/li>\n<li>Purging in the LiteSpeed Cache plugin usually clears the pages Hostinger CDN cached as well: the CDN acts on the plugin&rsquo;s purge signal when it arrives on an uncached response, which is the case for purges triggered from the WordPress admin. <a href=\"https:\/\/www.hostinger.com\/support\/hostinger-cdn-how-to-clear-the-cache\/\">Flush the CDN cache<\/a> if a change still does not appear &mdash; that is the reliable step.<\/li>\n<li>Change the file name or add a version parameter (<code>style.css?v=2<\/code>) when you deploy new static files, so visitors&rsquo; browsers fetch the new copy as well.<\/li>\n<li>Follow <a href=\"https:\/\/www.hostinger.com\/support\/hostinger-cdn-how-to-clear-the-cache\/\">Hostinger CDN: How to clear the cache<\/a> for the step-by-step flush procedure and the other cache layers on your hosting plan.<\/li>\n<\/ol><h2 id=\"h-hostinger-ai-builder-websites\">Hostinger AI Builder websites<\/h2><p>Websites built with <a href=\"https:\/\/www.hostinger.com\/ai-builder\/\">Hostinger AI Builder<\/a> are cached completely, including HTML, for up to 7 days, and the cache is refreshed automatically when you publish changes. No caching settings are needed or available for these websites.<\/p><p>With static files cached by default, HTML cached on your terms, and personal pages always fresh, Hostinger CDN speeds up delivery without serving stale or private content.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn what Hostinger CDN caches, for how long, and how to control it from your website.<\/p>\n","protected":false},"author":594,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"include_on_kodee":true,"footnotes":""},"categories":[262],"tags":[],"class_list":["post-18721","post","type-post","status-publish","format-standard","hentry","category-cdn"],"hreflangs":[],"include_on_kodee":true,"_links":{"self":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/18721","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/users\/594"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/comments?post=18721"}],"version-history":[{"count":2,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/18721\/revisions"}],"predecessor-version":[{"id":18724,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/posts\/18721\/revisions\/18724"}],"wp:attachment":[{"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/media?parent=18721"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/categories?post=18721"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hostinger.com\/support\/wp-json\/wp\/v2\/tags?post=18721"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}