I recently renamed a page in a site. Our sitemap is set up to update daily. However, I’m seeing both the old name and the new name listed in the sitemap, even though this change was made over a week ago. This is for both the live site and my localhost version. Is there anything I can do to remove the old page name?
You need to share the project because we cannot guess what’s going from the description.
@alexandros Here is the published site - https://tyk.io/docs/. The renamed page is https://tyk.io/docs/tyk-gateway-api/. This used to be named https://tyk.io/docs/tyk-rest-api/. Both these pages are still listed in the sitemap file https://tyk.io/docs/sitemap.xml. This name change is over a week old.
Here is my sitemap template:
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{{ range .Data.Pages }}
<url>
<loc>https:{{ .Permalink }}</loc>{{ if not .Lastmod.IsZero }}
<lastmod>{{ safeHTML ( .Lastmod.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ end }}{{ with .Sitemap.ChangeFreq }}
<changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>{{ end }}
</url>
{{ end }}
</urlset>
And my config settings:
sitemap]
changefreq = "daily"
priority = 0.5
filename = "sitemap.xml"
@marksouthee I copied the sitemap in a temporary Gist for clarity.
The only instance of the renamed page https://tyk.io/docs/tyk-gateway-api/
is present at line 22 of the sitemap.
I am unable to find a reference to the old page https://tyk.io/docs/tyk-rest-api/
in the sitemap as shown in the Gist link above.
Also I’ve looked at the project’s templates and content files but I didn’t see anything that could cause what you mention.
It seems like this is a caching issue on your end.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.