Vercel deployment issue

I’m running into an issue with the Vercel deployment:
• Pushing code to GitHub successfully triggers a new deployment (visible in the Vercel dashboard).
• The custom domain still serves the old UI, even after several deploys.
• Backend environment variable changes reflect correctly (so deployments are working).
• UI code changes do not show up on the custom domain.


Actions Already Taken
• Hard refresh and incognito testing → No effect
• Query string cache busting (e.g. /index.html?v=2) → No effect
• Added Cache-Control: no-store, no-cache, must-revalidate… via vercel.json → Present
• Redeployed multiple times with “Clear Build Cache” enabled → No effect
• DNS verified and pointing directly to Vercel → Correct
• No external CDN or proxy in front (e.g. Cloudflare) → Confirmed
• Did not remove/re-add domain (to avoid risk of downtime)


Current vercel.json

{
  "buildCommand": "npm ci && npx vite build --mode production",
  "installCommand": "npm ci",
  "outputDirectory": "dist",
  "rewrites": [
    {
      "source": "/(.*)",
      "destination": "/index.html"
    }
  ],
  "headers": [
    {
      "source": "/(.*)\\.(js|css|html)",
      "headers": [
        {
          "key": "Cache-Control",
          "value": "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
        }
      ]
    }
  ]
}

Summary
• Deployments succeed
• Custom domain remains stuck on old UI
• Env variable updates apply correctly
UI code changes not reflecting on custom domain

Currently I don’t see any UI changes.

This does sound like a caching issue that’s hanging around even after your troubleshooting. A few more things you can try:

First, double-check that your custom domain is actually pointing to the latest deployment. You can do this in your project dashboard under Settings → Domains, make sure it’s showing the most recent deployment hash. If not, try reassigning it.

Then, open your browser’s dev tools and check the Network tab while loading your site. Look out for any 304 (Not Modified) responses, or files being served from cache instead of the network. It’s also worth verifying that what’s being served actually matches your latest code.

If you’re still seeing stale content, try setting more aggressive cache headers in your vercel.json:

{
  "headers": [
    {
      "source": "/(.*)",
      "headers": [
        { "key": "Cache-Control", "value": "no-cache, no-store, must-revalidate" },
        { "key": "Pragma", "value": "no-cache" },
        { "key": "Expires", "value": "0" }
      ]
    }
  ]
}

Lastly, check your build output in the dashboard to make sure new files are actually being generated and deployed.

Let us know how you get on!