A page that search engines never fetch can't rank, and a page they fetch but don't keep can't rank either. Crawling and indexing are the two stages you control most directly, and most of the work comes down to a few small files and tags. This lesson explains what each one does, and especially what each one doesn't do, because mixing them up is one of the most common ways sites accidentally hide pages.
What crawlers do
A crawler is an automated client that requests URLs over HTTP, reads the responses, and queues new URLs it discovers. Google's main crawler is Googlebot, which today crawls primarily as a smartphone browser (mobile-first indexing). Other engines have their own crawlers, such as Bingbot.
Crawlers find URLs from:
- links in pages they have already crawled (
<a href="…">elements), - XML sitemaps,
- redirects from URLs they already knew,
- and, for Google, URLs submitted with Search Console's URL Inspection tool.
They don't fill in forms, click buttons, or scroll the way a person does. If a page is reachable only after an interaction, assume a crawler won't find it.
HTTP requests and responses
Every crawl starts with a request and ends with a status code. The code tells the crawler what to do next:
200 OK: the content is here; consider indexing it.301 Moved Permanentlyor308 Permanent Redirect: the page moved; follow theLocationheader and treat the new URL as the one to keep.302 Foundor307 Temporary Redirect: follow it, but the original URL may stay the one shown in results.404 Not Foundor410 Gone: there is no page; drop it from the index over time.500-range errors: the server failed; try again later. If errors persist, the crawler slows down and eventually drops URLs.
You can see these yourself with curl, which prints the response headers:
curl -I https://www.example.com/guides/sourdough-starter/HTTP/2 200
content-type: text/html; charset=utf-8
cache-control: public, max-age=300robots.txt: rules for crawling
robots.txt is a plain text file at the root of a host, such as https://www.example.com/robots.txt. It tells well-behaved crawlers which paths they may request. The format is standardized in RFC 9309 (opens in a new tab).
# Applies to every crawler
User-agent: *
Disallow: /cart/
Disallow: /search
Allow: /search/help
# Where to find the sitemap (must be a full URL)
Sitemap: https://www.example.com/sitemap.xmlKey rules:
- Each host and protocol has its own file.
https://shop.example.com/robots.txtis separate fromhttps://www.example.com/robots.txt. Disallow: /searchblocks every path that starts with/search, including/search-tips. Paths are prefix matches, and*and$wildcards are supported by major crawlers.- When several rules match, the most specific (longest) one wins, so
Allow: /search/helpoverridesDisallow: /searchfor that path. - robots.txt is public and voluntary. It is not a security tool: anyone can read it, and badly behaved bots can ignore it.
XML sitemaps: a list of URLs you want found
A sitemap is a file listing the canonical URLs you want search engines to know about. It helps discovery, especially for new pages or large sites, but it doesn't force indexing.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/</loc>
<lastmod>2026-10-01</lastmod>
</url>
<url>
<loc>https://www.example.com/guides/sourdough-starter/</loc>
<lastmod>2026-10-20</lastmod>
</url>
</urlset>Per the sitemaps protocol (opens in a new tab), a single file can hold up to 50,000 URLs and 50 MB uncompressed; larger sites split into several files listed in a sitemap index. Google says it uses <lastmod> when it's consistently accurate and ignores <priority> and <changefreq>. List only URLs that return 200 and are the canonical version; a sitemap full of redirects and errors teaches crawlers to trust it less.
Meta robots and X-Robots-Tag: rules for indexing
To keep a page out of the index, use a noindex directive. In HTML it goes in the <head>:
<meta name="robots" content="noindex">For files that aren't HTML (PDFs, images), or to set it server-wide, send it as an HTTP header:
HTTP/1.1 200 OK
Content-Type: application/pdf
X-Robots-Tag: noindexOther useful values include nofollow (don't follow links on this page), nosnippet (don't show a text snippet), and max-image-preview:large. You can target one crawler with its name, as in <meta name="googlebot" content="noindex">. The full list is in Google's robots meta tag documentation (opens in a new tab).
Blocking crawling is not the same as preventing indexing
This is the most important idea in the lesson:
- robots.txt
Disallowstops the crawler from fetching a URL. noindextells the search engine not to keep a URL it has fetched.
They work against each other if you combine them on the same URL. If robots.txt blocks a page, the crawler never fetches it, so it never sees the noindex. And a blocked URL can still be indexed without its content if other pages link to it: it may appear in results as a bare URL with no description.
So:
- To keep a page out of search results, allow crawling and use
noindex. - To save crawler effort on endless, low-value URLs (internal search results, filter combinations), use robots.txt, accepting that a few might still show as bare URLs if heavily linked.
- To keep something private, use authentication. Neither robots.txt nor
noindexprotects content.
Google ended support for noindex inside robots.txt in 2019, so a line like Noindex: /private/ does nothing there.
Indexability: the checklist
A URL is indexable when all of these are true:
- It's allowed by robots.txt.
- It returns
200 OK(not a redirect, not an error). - It has no
noindexin a meta tag or header. - Its canonical URL points to itself (or is absent).
- Its main content is present in the HTML, or rendered reliably by JavaScript.
Indexable doesn't mean indexed. Search engines still choose what to keep based on quality and duplication.
Canonical URLs, briefly
The same page is often reachable at several addresses: with and without www, with tracking parameters, or with and without a trailing slash. A canonical tag tells search engines which address you prefer:
<link rel="canonical" href="https://www.example.com/guides/sourdough-starter/">It's a strong hint, not a command. Lesson 7 covers canonicalization in depth.
Common indexing issues
These labels come from Google Search Console's Page indexing report:
- Crawled – currently not indexed: Google fetched it and chose not to index it yet. Often a quality or duplication signal.
- Discovered – currently not indexed: Google knows the URL but hasn't crawled it yet, often on newer or larger sites.
- Excluded by 'noindex' tag: as intended, or a template mistake.
- Blocked by robots.txt: as intended, or an overly broad rule.
- Alternate page with proper canonical tag: a duplicate that correctly points elsewhere. Usually fine.
- Duplicate, Google chose different canonical than user: your canonical hint was overruled. Check redirects, links, and sitemaps for conflicting signals.
- Soft 404: the page returns
200but looks empty or like an error page.
Step by step: check whether a page can be indexed
- Request the URL with
curl -I(or your browser's Network tab) and confirm200 OKwith noX-Robots-Tag: noindex. - Open
/robots.txtand check that noDisallowrule matches the path. Google Search Console's robots.txt report shows the version Google fetched. - View the page source and search for
name="robots"andrel="canonical". - In Search Console, paste the URL into URL Inspection. It reports whether the URL is on Google, which canonical Google selected, and the last crawl. Test live URL checks the current version.
- If everything is correct but the page is new, select Request indexing and make sure at least one indexed page links to it.
Common mistakes and troubleshooting
- Launching with the staging robots.txt. A leftover
Disallow: /blocks the entire site. Check robots.txt in your launch checklist. - A
noindexin a shared template. One line in a layout file can remove every page that uses it. Search the rendered HTML, not just the template you edited. - Blocking CSS and JavaScript. If the crawler can't fetch your scripts and styles, it may not render the page correctly.
- Sitemaps that list non-canonical URLs. Every URL in a sitemap should be the final,
200, self-canonical address. - Expecting robots.txt to remove a page. To remove an indexed page, let it be crawled with
noindex, or return404/410. Search Console's Removals tool only hides a URL temporarily.
Key takeaways
- Crawling is fetching; indexing is keeping. Use robots.txt to manage the first and
noindexfor the second. - A URL blocked in robots.txt can't show its
noindex, and can still appear as a bare URL. - Sitemaps help discovery but don't guarantee indexing; list only canonical,
200URLs. - Use authentication, not robots rules, for anything private.
Exercise
For your own site:
- Open
/robots.txtand explain each line in plain words. - Find your sitemap (from robots.txt or
/sitemap.xml) and spot-check five URLs: do they return200without redirecting? - Pick a page that should never appear in search (a thank-you page, for example). Is it handled with
noindex, or only with robots.txt?
Practice with RankMiso. On any page, RankMiso (our free extension) lists the indexability signals it finds under Technical: meta robots, Googlebot and Bingbot tags, canonicals, and the status code. In Chrome, Check this site goes further after you allow the site: it reads the
X-Robots-Tagheader, tests the path against robots.txt (the Googlebot group, else*), and says whether the URL is in the first listed sitemap. Confirm what Google kept with URL Inspection. Free on the Chrome Web Store (opens in a new tab) and Firefox Add-ons (opens in a new tab).
References
- Google Search Central: Introduction to robots.txt (opens in a new tab)
- RFC 9309: Robots Exclusion Protocol (opens in a new tab)
- Google Search Central: Robots meta tag, data-nosnippet, and X-Robots-Tag (opens in a new tab)
- Google Search Central: Block Search indexing with noindex (opens in a new tab)
- Google Search Central: Learn about sitemaps (opens in a new tab)
- sitemaps.org: Sitemaps XML format (opens in a new tab)
- Google Search Central: Googlebot (opens in a new tab)
What's next
Your pages can now be found and kept. The next question is whether they match what people actually search for. Keywords, Search Intent, and Search Queries shows how to work out what a searcher wants before you write.

