All articles
CloudFront

CloudFront ETag and Last-Modified for WordPress SEO

HandL WP Engineering·
CloudFront ETag and Last-Modified for WordPress SEO

CloudFront can serve correct WordPress pages while still confusing freshness checks if HTML, sitemap, and assets use different cache rules. ETag and Last-Modified headers help crawlers revalidate changed content when the origin and invalidation strategy are consistent.

Use this for WordPress, headless WordPress, S3, CloudFront, prerendered HTML, and static sitemap setups where published changes do not appear consistently to crawlers.

Quick answer

CloudFront ETag and Last-Modified for WordPress SEO should be handled with a narrow evidence-first workflow: compare headers, separate html cache, check etag changes, then verify the result before making broader changes.

What to check first

  • Compare headers for the clean URL, sitemap, images, and JavaScript assets.
  • Confirm HTML is not cached like immutable static assets.
  • Check whether ETag changes when the blog post changes.
  • Verify Last-Modified matches the S3 object or origin update time.
  • Invalidate the clean URL and sitemap after publishing.

Diagnostic table

Use this table to keep the work practical. It connects the symptom to evidence and a verification step.

ActionEvidence to collectHow to verify
Compare headersCompare headers for the clean URL, sitemap, images, and JavaScript assets.The clean blog URL shows the latest ETag after publish.
Separate HTML cacheConfirm HTML is not cached like immutable static assets.The sitemap Last-Modified or content changes after publish.
Check ETag changesCheck whether ETag changes when the blog post changes.Images keep long cache while HTML stays easier to refresh.
Check Last-ModifiedVerify Last-Modified matches the S3 object or origin update time.CloudFront invalidation targets the canonical clean URL.

Useful command or data shape

Adapt paths, IDs, and privacy handling to the site before running commands or storing data on production.

curl -sS -I https://example.com/blog/post-slug
curl -sS -I https://example.com/sitemap.xml
curl -sS -I https://example.com/images/blog/post/post-hero.webp
# Compare ETag, Last-Modified, Cache-Control, and X-Cache.
CloudFront validator header audit for CloudFront ETag and Last-Modified for WordPress SEO

Safe fix order

Do the work in a sequence that makes each result easy to prove. Stop if a step produces new evidence that changes the incident scope.

  1. Compare headers
  2. Separate HTML cache
  3. Check ETag changes
  4. Check Last-Modified
  5. Invalidate clean paths

Production verification checklist

  • The clean blog URL shows the latest ETag after publish.
  • The sitemap Last-Modified or content changes after publish.
  • Images keep long cache while HTML stays easier to refresh.
  • CloudFront invalidation targets the canonical clean URL.

Mistakes to avoid

  • Do not judge the fix by one browser or the homepage only.
  • Do not delete evidence before recording usernames, file paths, timestamps, and response headers.
  • Do not add a cache, security, or tracking plugin while the original problem is still unclear.
  • Do not leave test users, temporary debug logs, or broad API keys active after verification.

When HandL WP should help

Bring in help when this affects leads, checkout, search visibility, malware risk, paid media reporting, or a client production site. HandL WP can trace the issue through WordPress, hosting, cache, tracking, and Search Console, then verify the workflow after the technical fix.

If this is active on a production site, audit WordPress CloudFront SEO.

Helpful references

Ready when you are

Get WordPress help, before the next lead is lost.

Tell us what’s broken or what you need built. We’ll review your request and reply with clear next steps, usually within a few business hours.

Same-day emergency triage · Backed by HandL Digital