nystudio107 / craft-seomatic

SEOmatic facilitates modern SEO best practices & implementation for Craft CMS 3. It is a turnkey SEO system that is comprehensive, powerful, and flexible.
https://nystudio107.com/plugins/seomatic
Other
166 stars 71 forks source link

Cache busting in Craft Cloud / Cloudflare #1511

Closed svale closed 2 months ago

svale commented 2 months ago

Question

Any tips on how to best bust the Clodflare cache of the robots.txt when running on Craft Cloud? After updating the environment variable from staging to live our robots.txt file is still stuck in its Cloudflare cached former version (cf-cache-status = HIT). The stale file is of course blocking all indexing.

This is also after the site is re-deployd, and caches are reset/cleared from in the CP. Even disabling the entire robots file is without effect, it is still returned from Cloudflare...

Querying the robots.txt directly with a random query string confirms that there is a new and correct file available.

Additional context

Craft Cloud Extension 2.6.1 Craft 5.4.3 SEO 5.1.2

Thanks!

svale commented 2 months ago

Ah, upon further investigation...: this might very well have been an issue created by Cloudflare caching on the DNS/Proxy level before reaching the Craft Cloud / SEOmatic setup. And I eventually realised that I was able to purge the cache from our account. I'll close this. Thanks.