GTMetrix’s “Add Expires headers” warning indicates that some assets on your Webflow site don’t have cache-control policies telling browsers how long to store them. This usually affects third-party resources or specific asset types.
1. Understand What You Can and Cannot Control
- Webflow-hosted assets (images, scripts, CSS): Webflow automatically includes cache headers, typically with far-future expiration (1 year).
- Third-party assets (e.g., Google Fonts, embedded YouTube videos): You cannot modify their headers; they’re served from external domains.
- GTMetrix may still flag these third-party resources, even though you can’t control them.
2. Minimize Third-Party Dependencies
- Limit external libraries and embeds where possible.
- Host fonts locally if you're using Google Fonts—this gives you full control (see Webflow’s custom font upload options).
- Avoid using plugins or services that inject assets from external sources without caching policies.
3. Host Key Assets Locally When Possible
- Upload custom fonts in the Webflow Designer instead of linking to external font URLs.
- Use uploaded images in Webflow rather than hotlinking or embedding from other domains.
4. Use Webflow’s Asset Compression and Publishing Features
- Enable asset minification in Project Settings > Hosting for CSS and JavaScript.
- Republish your site after compression is turned on to ensure updates are live.
5. Use a Custom Domain with Webflow Hosting
- Sites on a custom domain and Webflow hosting benefit from Webflow’s CDN, which serves files with proper cache headers.
- If you’re only hosting on the *.webflow.io subdomain, consider adding a custom domain to benefit from full performance features.
6. Accept that Some Items Will Still Be Flagged
- GTMetrix flags any uncached resources, including third-party assets. If you’ve optimized everything within your control, the remaining issues likely can't be resolved without removing or replacing the external assets.
Summary
To fix “Add Expires headers” in GTMetrix for a Webflow site, ensure you’re hosting assets through Webflow, minimize third-party scripts and embeds, and upload custom fonts directly. You cannot fix this for external assets, so if GTMetrix flags those, they're outside your control.