The “Add Expires headers” warning in GTMetrix means that certain assets (like images, scripts, or stylesheets) don’t specify how long browsers should cache them, which can slow down repeat visits. Webflow handles most headers for CDN-hosted assets, but there are a few limitations.
1. Understand What You Can and Can’t Control in Webflow
- Webflow-controlled assets (site files like images, CSS, and JS uploaded via the Webflow Designer) are hosted on Webflow’s CDN and typically include optimized cache headers by default.
- Third-party resources (e.g., Google Fonts, YouTube embeds, external scripts) often trigger the "add expires headers" warning — and you cannot change headers on those.
- Custom code embeds (inside Page Settings → Custom Code or Site Settings → Custom Code) can load assets without proper cache headers if hosted externally or not optimized.
2. Identify the Problematic Assets in GTMetrix
- Click on “Add Expires Headers” in GTMetrix’s report.
- Review the list of assets:
- If they’re hosted on domains like assets.website-files.com, they’re served by Webflow.
- If they’re from domains like fonts.gstatic.com, youtube.com, or cdn.jsdelivr.net, those are external and beyond your control.
3. Replace or Self-Host External Assets (When Possible)
- Google Fonts: Use built-in Webflow font integrations or download and self-host fonts via Project Settings → Fonts, which allows better control over caching.
- YouTube Embeds: Replace standard YouTube embeds with lightweight embed solutions, e.g. using a thumbnail image with a play button overlay and lazy-loading the actual video iframe only on click.
- Custom Script Libraries: Instead of linking to external CDNs (like cdn.jsdelivr.net or unpkg), download and host a copy via Webflow’s Assets panel if licensing and file size allow.
4. Avoid or Optimize Third-Party Widgets
- Many third-party widgets (chat tools, analytics, social media embeds) load assets without proper caching headers.
- Limit the use of these, or switch to providers that offer optimized performance settings.
5. Accept the Limits of the Platform
- You cannot edit HTTP cache headers for assets on Webflow’s CDN.
- “Add expires headers” is a best-practice warning and won’t drastically impact performance if only affecting third-party or minor assets.
Summary
To fix “Add expires headers” in GTMetrix for your Webflow site:
- Check if the flagged assets are third-party — if so, you likely can’t control them.
- Host libraries and fonts within Webflow where possible for better caching.
- Use lightweight or lazy-loaded alternatives for embeds like YouTube.
- Understand that Webflow sets efficient caching for built-in assets, and perfect scores aren’t always possible due to third-party content.