Technical SEO Basics: robots.txt, Sitemaps & Indexing
How crawling and indexing really work, the robots.txt mistakes that quietly hide pages, and how to get the right URLs into Google.
Technical SEO is the plumbing that lets search engines find, crawl and index your content. You can write perfect
titles and brilliant articles, but if a robots.txt rule blocks the page or a stray noindex
tag removes it, none of that effort reaches searchers. This guide covers the essentials — how crawling and indexing
work, how to use robots.txt safely, and how sitemaps get the right URLs discovered.
Crawling vs indexing
These two words are often used interchangeably, but they're different steps. Crawling is discovery: a bot such as Googlebot follows links and reads your sitemap to fetch pages. Indexing is analysis and storage: the search engine processes a crawled page and decides whether to add it to its index, from which results are served. A page must usually be crawled before it can be indexed — but being crawled is no guarantee of being indexed, and vice versa.
robots.txt: controlling the crawl
robots.txt is a plain-text file at the root of your domain (example.com/robots.txt) that
tells crawlers which paths they may or may not fetch. A simple file looks like this:
User-agent: *
Disallow: /admin/
Disallow: /cart/
Sitemap: https://example.com/sitemap.xml
The golden rule: robots.txt controls crawling, not indexing. Disallowing a URL stops Google
fetching it, but if other pages link to that URL it can still appear in results as a bare link with no description.
To truly keep something out of the index, let it be crawled and add a noindex meta robots tag instead.
Common robots.txt mistakes
- Accidentally disallowing the whole site with
Disallow: /— often left over from a staging environment. - Blocking CSS or JavaScript that Google needs to render and understand the page.
- Relying on robots.txt to hide private content — it's a public file and not a security control.
- Forgetting the sitemap line, missing an easy way to point crawlers at your URL list.
Before you rely on a robots.txt file, test it. Our free Robots.txt Tester fetches the live file, lists the user-agent rules and surfaces any declared sitemaps, and the Robots.txt Generator builds a valid file with the right allow/disallow rules and sitemap line.
Meta robots and the noindex tag
Where robots.txt works at the path level, the meta robots tag works per page:
<meta name="robots" content="noindex, follow">. Use noindex for pages you don't want
in search (thank-you pages, internal search results, thin tag archives) while still letting crawlers follow their
links. The most damaging technical SEO bug is an accidental site-wide noindex — always confirm your
important pages are set to index, follow.
XML sitemaps: guiding discovery
An XML sitemap is a list of the URLs you want search engines to crawl, often with a last-modified date for each. It doesn't force indexing, but it speeds discovery — especially valuable for new sites, large sites, or pages that aren't well linked internally. Submit your sitemap in Google Search Console and reference it from robots.txt.
You can build one in seconds with the free XML Sitemap Generator: it crawls your site and produces a ready-to-submit sitemap of its pages.
Confirm a page can actually be indexed
When a page that should rank simply isn't showing up, work through the chain: is it blocked in robots.txt? Does it
carry a noindex? Is the canonical pointing elsewhere? The free
Google Index Checker checks whether Google is
allowed to index a page and offers a one-click site: search to see what's currently indexed.
Technical SEO and on-page SEO work together — once crawling and indexing are healthy, work through the on-page SEO checklist to make each indexable page as strong as it can be.