1

How can I update sitemap file without losing the old URLs? In other words, does the Google search engine keep the old URLs indexed and add the new ones, or does it erase removed URLs?

2

Sitemaps don't have much to do with indexing or rankings. You could remove URLs from your sitemap or even remove your sitemap entirely without hurting your SEO.

  • A sitemap isn't needed to get the pages on your site crawled and ranked. Googlebot will crawl your site from the home page even without a sitemap.
  • Sitemaps can occasionally help Googlebot discover pages on your site that are not linked from other pages. Googlebot will crawl that page but usually it will decide not to index or rank it. To get pages indexed and ranked well, they really need to be linked from other pages.
  • Google doesn't use several fields that can be added to sitemaps. The changefreq and priority fields are just ignored. Googlebot comes back to crawl URLs based on how popular they are and how often Google has seen them change before.
  • The biggest benefit of Sitemaps is providing extra data to you in Google Search Console.
  • Google also uses sitemaps as a signal as to your preferred URLs. If you do have a sitemap you should ensure that it is clean.
    • No duplicates
    • No error URLs
    • No redirecting URLs

For more information see The Sitemap Paradox.

1

If they are still valid, it will keep them. If they start returning error codes, then they will usually be removed.

If this is a case of having sitemaps from different applications, then Google will accept multiple sitemaps for the same website. An example of where I do this is on one of my product websites. I use Google's own scripts to periodically create a sitemap of the main static pages. The online documentation is created by Help&Manual - and this creates its own sitemap which I also submit to Google.

  • thnks for ur answer, so i don't need to worry about removing the invalid urls manualy ? – Abdessamad Elouarti Apr 13 '18 at 15:07
  • If the URLs are invalid you really should remove them. Google expects to find a list of good URLs in sitemaps. – Stephen Ostermiller Apr 13 '18 at 15:10
  • the problem is that I have multiple sitemap files, and if a user has removed an article from the website, I need to find which file contains the url of the article and remove it – Abdessamad Elouarti Apr 13 '18 at 15:18
  • Yes remove them if they're invalid. It sounds like you need an automated script to create the sitemap. Eg. Google have their own scanning scripts; and applications like WordPress can also create sitemaps or have plugins to do so. – winwaed Apr 13 '18 at 15:28
  • Also look at the Google Search Console (aka "Webmaster Tools" last week and who knows what it will be called next week) - these can be used to test your sitemap, tell you which URLs are giving errors/etc. – winwaed Apr 13 '18 at 15:29
1

Large sites have too many pages to all be included in one sitemap file. As a result, it's normal to remove the last result of a sitemap when adding a new one. If you want to have every URL on your site in a sitemap, you can have multiple sitemaps with older pages.

Google discovers pages on your site through your sitemap when crawled. It is not necessary to have a sitemap on your website, nor is it necessary for all of your pages to be in a sitemap to stay indexed. Sitemaps are simply a way for Google to discover your pages that it hasn't discovered through links.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.