If I remove URLs from an XML sitemap will Google still index them?

7,810

Solution 1

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.

Solution 2

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.

Solution 3

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.

Share:
7,810
Abdessamad Elouarti
Author by

Abdessamad Elouarti

Updated on September 18, 2022

Comments

  • Abdessamad Elouarti
    Abdessamad Elouarti over 1 year

    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?

  • Stephen Ostermiller
    Stephen Ostermiller about 6 years
    If the URLs are invalid you really should remove them. Google expects to find a list of good URLs in sitemaps.
  • Abdessamad Elouarti
    Abdessamad Elouarti about 6 years
    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
  • winwaed
    winwaed about 6 years
    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.
  • Abdessamad Elouarti
    Abdessamad Elouarti about 6 years
    that was very helpful, thnks