N
Nuxt3mo ago
Mohit

Sitemap.xml

in my development environment my sitemap.xml shows 139 urls but in my production environment it shows only 29 urls can anyone tell me why?
13 Replies
pyplacca
pyplacca3mo ago
production is probably showing a previously cached result
Mohit
Mohit3mo ago
so how to see it properly because I cleared the cookies and site data but still same issue
pyplacca
pyplacca3mo ago
try clearing the cache on the server (where you deployed the app), then redeploy the app
Mohit
Mohit3mo ago
it's not showing the urls of /blog/[id] urls
pyplacca
pyplacca3mo ago
each blog is retrieved from a db, right? if so, you'd have to fetch the blogs when generating the sitemap.xml
Mohit
Mohit3mo ago
well I don't know exactly but we deployed it on aws amplify
pyplacca
pyplacca3mo ago
but since you say you already have that on dev, I suspect it's a cache problem hmm. I haven't deployed on aws before
Mohit
Mohit3mo ago
ok
pyplacca
pyplacca3mo ago
u can also give it a few hours to a day and see if it gets updated
Mohit
Mohit3mo ago
sure and thanks for help will see to that hey you said about the cache problem but amplify works basically like netlify where with every push you make it redeploys
pyplacca
pyplacca3mo ago
on Netlify, you can do a "clear cache and redploy". see if that's possible on AWS
Mohit
Mohit3mo ago
ok
pyplacca
pyplacca3mo ago
static files are usually cached so unless the cached file has exceeded its expiry, subsequent deployments aren't going affect it