VeryAppı
SEO & visibility

Sitemap and robots.txt Explained Simply

Published on November 10, 2025·8 min read

The XML sitemap is a list of a site's pages that you submit to Google to help it discover them. The robots.txt file tells search engine bots which parts of the site they're allowed to crawl. Both are simple technical files, usually generated automatically by a modern CMS, but a misconfiguration of either one can keep entire pages out of Google's results.

The problem: two invisible files that can block an entire site

A sitemap and a robots.txt file are never shown to a visitor. They live at technical addresses (/sitemap.xml and /robots.txt) that nobody checks day to day. That's exactly what makes them dangerous: a configuration mistake — a robots.txt that accidentally blocks the whole site after a migration, a sitemap pointing to outdated URLs — can go unnoticed for months while organic traffic quietly drops, with no visible error message ever alerting the site owner.

These are two different files with distinct roles, often confused with each other. Understanding the difference avoids the most common configuration mistakes.

The XML sitemap: the site map for search engines

The sitemap is an XML file listing the site's URLs, sometimes with extra information (last modification date, update frequency). It doesn't guarantee a page gets indexed, but it makes discovery easier, particularly for:

  • sites with many pages (e-commerce, active blogs);
  • deep pages with few internal links pointing to them;
  • newer sites, whose structure Google hasn't fully mapped yet.

A modern CMS (WordPress with an SEO plugin, Shopify, most custom-built solutions) generates the sitemap automatically at yoursite.com/sitemap.xml. It updates itself every time a new page is published. The human work mostly consists of checking that it exists, that it's up to date, and that it's actually been submitted in Google Search Console.

The robots.txt file: the crawling rules

Robots.txt is a text file at the root of the site (yoursite.com/robots.txt) that gives instructions to search engine bots: which sections to crawl, which to avoid. It mainly serves to:

  • stop bots from wasting crawl time on pages with no SEO value (cart, user account, internal search pages);
  • flag where the sitemap is located (a Sitemap: line at the end of the file);
  • in rare cases, fully block crawling of a site still in development.

One point that's often misunderstood: robots.txt blocks crawling, not indexing. A page forbidden from being crawled can still appear in Google's results, without a title or description, if it's linked from elsewhere on the web. To actually remove a page from search results, the right method is the <meta name="robots" content="noindex"> tag placed directly in the page's code, not a robots.txt block.

The most common mistakes

A robots.txt that accidentally blocks the whole site

This is the costliest mistake. It typically happens after a migration: the staging site had a Disallow: / line to stop Google from indexing a test version, and that line was never removed when the site went live. The result: the entire site gradually disappears from search results, often without anyone spotting the cause right away.

A sitemap that was never submitted to Google Search Console

The file exists and is correct, but nobody flagged it to Google. Without an explicit submission, Google usually finds it on its own eventually, but with an extra delay that a few clicks could have avoided.

A sitemap listing outdated or broken URLs

After a redesign or the deletion of pages, the sitemap sometimes keeps listing URLs that return a 404 error. This doesn't directly hurt the ranking of other pages, but it complicates Google's job and can delay the indexing of new pages.

Confusing noindex with disallow

Blocking a page through robots.txt in the belief that it will be removed from search results doesn't work reliably, for the reason explained above. It's a classic technical mix-up that leaves unwanted pages visible in Google.

A special case: multilingual sites and e-commerce sites

On a site available in several languages, each language version should appear in the sitemap with its associated hreflang tags, so Google understands which version to serve based on the visitor's language and country. A sitemap that only lists one language, or that omits these tags, can lead Google to show the wrong language version in results, or to ignore some translated pages because they weren't clearly identified as distinct.

On an e-commerce site, the sheer volume of pages (product pages, variants, categories, filter pages) creates a different challenge: a single sitemap quickly becomes too large and hard to keep up to date manually. Common practice is to generate several segmented sitemaps (products, categories, editorial content) linked together through a "sitemap index" file, which most e-commerce platforms (Shopify, WooCommerce, custom-built solutions) generate automatically.

How to fix a mistake quickly once it's spotted

Once a robots.txt or sitemap issue has been identified in Search Console, fixing it is usually quick:

  • for a robots.txt blocking too much content, simply remove or adjust the relevant Disallow line, then check it using the robots.txt testing tool built into Search Console;
  • for a sitemap with broken URLs, identify their source (deleted pages, misconfigured redirects) and regenerate the file, which happens automatically on most CMS platforms once the underlying content is fixed;
  • after any fix, request a new crawl in Search Console rather than waiting for bots to pass through naturally, which speeds things up from a few days to a few hours in most cases.

Quick verification checklist

CheckHow to do itExpected result
The sitemap existsOpen yoursite.com/sitemap.xml in a browserA list of URLs in XML format shows up
The sitemap is submittedGoogle Search Console > SitemapsStatus shows "Success", discovered pages displayed
Robots.txt doesn't block the siteOpen yoursite.com/robots.txtNo Disallow: / line covering the entire site
Robots.txt references the sitemapRead the end of the robots.txt fileA Sitemap: https://yoursite.com/sitemap.xml line
No broken URLs in the sitemapGoogle Search Console > Sitemaps, or a crawl toolNo 404 URLs listed

What to remember

  • The sitemap makes it easier for Google to discover pages; robots.txt controls how the site gets crawled.
  • Robots.txt doesn't remove a page from search results: that's the job of the noindex tag.
  • The costliest mistake is a robots.txt that blocks the whole site after a migration that wasn't properly finished.
  • A modern CMS generates both files automatically; the work mainly involves checking their content, not writing them by hand.
  • Google Search Console lets you check in a few minutes whether these files are being properly picked up.

Frequently asked questions

Can a site with no sitemap still be indexed by Google? Yes, Google can discover pages by following internal links, without a sitemap. But on a site with several dozen pages or a loosely linked structure, the sitemap speeds up and makes that discovery more reliable. It becomes almost essential for e-commerce sites or sites that publish content often.

Should I block unnecessary pages with robots.txt? Robots.txt prevents crawling, not indexing: a blocked page can still show up in Google without a description if it's linked from elsewhere. To actually remove a page from results, use a noindex meta tag on the page itself instead.

How do I know if my sitemap is properly picked up by Google? In Google Search Console, under the Sitemaps section, add your sitemap's URL and check its status. Google shows the number of pages discovered and, separately, the number actually indexed: the two figures don't always match.

Does the sitemap have to include absolutely every page on the site? No, only the pages you want indexed: content pages, products, categories. Technical pages (login, cart, generic legal notices) have no place in the sitemap.

In summary

Sitemap and robots.txt are technical files that look minor on the surface, but a configuration mistake can block an entire site's indexing without a single visible warning sign. A quick check in Google Search Console is enough to rule out the risk. At VeryAppi, every website delivered on subscription comes with an automatically generated sitemap and a correctly configured robots.txt from the moment it goes live.

Frequently asked questions

Can a site with no sitemap still be indexed by Google?

Yes, Google can discover pages by following internal links, without a sitemap. But on a site with several dozen pages or a loosely linked structure, the sitemap speeds up and makes that discovery more reliable. It becomes almost essential for e-commerce sites or sites that publish content often.

Should I block unnecessary pages with robots.txt?

Robots.txt prevents crawling, not indexing: a blocked page can still show up in Google without a description if it's linked from elsewhere. To actually remove a page from results, use a noindex meta tag on the page itself instead.

How do I know if my sitemap is properly picked up by Google?

In Google Search Console, under the Sitemaps section, add your sitemap's URL and check its status. Google shows the number of pages discovered and, separately, the number actually indexed: the two figures don't always match.

Does the sitemap have to include absolutely every page on the site?

No, only the pages you want indexed: content pages, products, categories. Technical pages (login, cart, generic legal notices) have no place in the sitemap.

Related articles

← Back to blog