Sub topic 10
Making pages crawlable and indexable
This chapter assumes you know what a URL and a web page are, and that you can read simple HTML. It also assumes you have read the earlier chapter on how Google crawls, indexes, and serves results. Here you will learn the controls that decide whether Google can fetch a page, whether it may keep that page in its index, and which URL it treats as the preferred one.
Crawlable and indexable are different things
A page has to pass two separate gates before it can appear in results.
- Crawlable means Googlebot, Google's crawler, can request the URL and receive its content. Network errors, server errors, blocked paths, and login walls stop this gate.
- Indexable means Google is allowed to store the page and is willing to. A
noindexdirective, a canonical pointing elsewhere, or content Google judges to be a duplicate or of low value stop this gate.
Most confusing indexing problems come from mixing up the two. A page can be crawlable but not indexable (it loads fine and says noindex). A page can also be blocked from crawling yet still be indexed as a bare URL, because Google learned of it from links.
Basic page signals: title, description, canonical
Three elements in the <head> tell Google what a page is about and which URL you prefer.
<head>
<title>How to Repot a Snake Plant | Example Garden</title>
<meta name="description" content="Step-by-step instructions for repotting a snake plant, including soil, pot size, and timing.">
<link rel="canonical" href="https://www.example.com/repot-snake-plant">
</head>- The
<title>element is the main source for the title link shown in results. Make it descriptive and specific to the page. Google may rewrite it if it does not match the page well. - The meta description is a candidate for the snippet under the title. Google often builds the snippet from page text instead, so it is a suggestion and not a command.
- The
rel="canonical"link names the URL you want treated as the main version when several URLs show the same or very similar content. Google treats it as a strong hint. It can choose a different canonical if other signals disagree.
Why canonicals matter
The same content often lives at several addresses: with and without www, with tracking parameters, with a trailing slash, or on both HTTP and HTTPS. Google groups these duplicates and picks one to show. If you do not state a preference, Google decides on its own, and its choice may not be the one you want.
Keep canonical signals consistent. Use the same preferred URL in the canonical tag, in internal links, in your sitemap, and in redirects. Mixed signals make Google's choice less predictable.
robots.txt: controlling crawling
A robots.txt file sits at the root of a host (for example https://www.example.com/robots.txt). It tells crawlers which paths they may fetch.
User-agent: *
Disallow: /cart/
Sitemap: https://www.example.com/sitemap.xmlThis file says: for all crawlers, do not fetch anything under /cart/, and here is where the sitemap lives.
Points to remember:
- robots.txt controls crawling, not indexing. If other pages link to a disallowed URL, Google can still index the URL without content, usually showing just the address.
- The file applies per host and protocol.
https://www.example.com/robots.txtdoes not governhttps://blog.example.com/. - A
Disallowrule is a request that reputable crawlers honor. It is not access control. Do not rely on it to hide private data. Use authentication for that. - Blocking CSS, JavaScript, or image files can stop Google from rendering the page properly, which can hurt how it understands the content.
The robots.txt and noindex trap
A common mistake is to block a page in robots.txt and add noindex to it, expecting it to vanish from results. Google can only see noindex if it can fetch the page. If robots.txt blocks the fetch, the directive is never read, and the URL may stay in the index.
noindex: controlling indexing
To keep a page out of search results, tell Google not to index it.
<meta name="robots" content="noindex">For non-HTML files such as PDFs, send the same instruction in an HTTP response header: X-Robots-Tag: noindex.
Rules for using noindex:
- Leave the page crawlable. Do not disallow it in robots.txt.
- Expect a delay. Google must recrawl the page before it drops it.
- Use it for pages that are useful to visitors but not to searchers, such as thank-you pages, internal search results, or staging copies.
- Do not use it on a page you want ranked. A stray
noindexleft over from development is a classic cause of a site vanishing from results.
Choosing the right control
| Goal | Right tool | Why |
|---|---|---|
| Stop crawlers wasting time on endless URLs | robots.txt `Disallow` | Saves crawl effort on pages you do not need fetched |
| Keep a page out of results | `noindex` (page stays crawlable) | Google must read the directive |
| Prefer one of several duplicate URLs | `rel="canonical"` or a redirect | Consolidates signals on one address |
| Keep content private | Authentication | Neither robots.txt nor `noindex` is security |
| Remove a page permanently | 404 or 410 status | Tells Google the page is gone |
HTTP status codes and redirects
Google reads the HTTP status code before it reads the page.
| Status | Meaning | Effect on indexing |
|---|---|---|
| 200 | OK | Content can be indexed |
| 301 or 308 | Permanent redirect | Signals the target is the new preferred URL |
| 302 or 307 | Temporary redirect | Signals the original URL may come back |
| 404 or 410 | Not found or gone | Page is dropped over time |
| 5xx | Server error | Google retries and may slow crawling; long outages can drop pages |
Two failure modes deserve attention.
- Soft 404s. A page that says "not found" to a visitor but returns status 200. Google detects many of these and treats them as errors. Return a real 404 instead.
- Redirect chains and loops. Each extra hop wastes crawl effort and may stop Googlebot before it reaches the destination. Redirect straight to the final URL.
Rendering JavaScript content
Googlebot fetches the HTML, then renders the page with a recent version of Chromium so it can see content that JavaScript adds. Rendering is queued, so JavaScript-dependent content can appear in the index later than plain HTML.
To lower the risk:
- Put important text, links, and the canonical tag in the initial HTML when you can, using server-side rendering or pre-rendering.
- Use real links:
<a href="/page">. Google follows links with anhrefattribute. It does not reliably follow links built only from click handlers. - Do not hide content behind actions Googlebot will not perform, such as clicking, scrolling to load more, or logging in.
- Avoid URL fragments (
#section) for distinct pages, because Google ignores the fragment when identifying a URL.
Sitemaps: helping discovery
A sitemap is an XML file listing URLs you want Google to know about. It helps most for new sites, large sites, and pages with few inbound links. Reference it in robots.txt, as shown above, or submit it in Search Console.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/repot-snake-plant</loc>
<lastmod>2026-01-15</lastmod>
</url>
</urlset>Guidelines:
- List only canonical, indexable URLs that return 200. A sitemap full of redirects and
noindexpages sends mixed signals. - Keep
lastmodhonest. Update it only when the page content changes in a meaningful way. - A sitemap is a hint. Listing a URL does not guarantee that Google crawls or indexes it.
- Each sitemap file is limited to 50,000 URLs or 50 MB uncompressed. Use a sitemap index file to combine several.
Structured data
Structured data is markup that describes a page in a machine-readable form. Google supports the schema.org vocabulary, and recommends the JSON-LD format.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "How to Repot a Snake Plant",
"author": { "@type": "Person", "name": "Jane Doe" },
"datePublished": "2026-01-15"
}
</script>Structured data helps Google understand what the page is and can make it eligible for enhanced displays in results, where Google supports that type. It does not directly raise your ranking. The markup must match visible page content, and markup that misleads can violate Google's spam policies.
Crawl budget and site structure
For most small and medium sites, crawl budget is not a concern. It matters for very large sites or sites that generate huge numbers of URLs, such as faceted navigation with many filter combinations. Googlebot adjusts its pace to avoid overloading your server and to focus on URLs it finds worth fetching.
Practical habits that help at any size:
- Link every important page from at least one other crawlable page. A page with no links to it is an orphan and is hard to discover without a sitemap.
- Use clear, stable URLs and avoid session IDs in them.
- Serve the site over HTTPS.
- Keep the server fast and reliable.
- Make the mobile version contain the same primary content as the desktop version, since Google indexes the mobile version first.
Common problems and their usual causes
| Symptom | Likely cause | First check |
|---|---|---|
| Page not in index, "Blocked by robots.txt" | A `Disallow` rule matches the URL | Review robots.txt rules |
| Page excluded, "noindex" detected | Leftover meta tag or header | View source and response headers |
| Google chose a different canonical | Conflicting signals or near-duplicate content | Compare canonical tags, redirects, and sitemap |
| Crawled but not indexed | Google judged content thin or duplicate | Improve value and uniqueness of the page |
| Content missing from indexed copy | JavaScript rendering problem | Inspect the rendered HTML |
Summary checklist
- Pages you want in results return 200, are not disallowed, and carry no
noindex. - Each page has a specific title, and a canonical that matches your internal links and sitemap.
- Important content and links appear in HTML that Googlebot can render.
- Removed pages return 404 or 410, and moved pages use a 301 redirect directly to the final URL.
- A clean sitemap lists only canonical, indexable URLs.
Exercise
A developer wants a staging page removed from search results. They add Disallow: /staging/ to robots.txt and also add <meta name="robots" content="noindex"> to the page. Weeks later the URL still appears in results as a bare address. Explain why, and give the fix.
Show answer
The robots.txt rule stops Googlebot from fetching the page, so it never reads the noindex tag. Google learned of the URL from links and keeps it as a URL-only entry. The fix is to remove the Disallow rule so the page is crawlable, keep noindex, and wait for Google to recrawl. For stronger protection, put the staging site behind authentication.
Exercise
Your sitemap lists 400 URLs. Search Console shows 150 of them redirect to other URLs and 40 return noindex. What should you change, and why?
Show answer
Remove the redirecting and noindex URLs from the sitemap, and list the final destination URLs of the redirects instead, provided they are canonical and indexable. A sitemap should contain only canonical URLs that return 200 and can be indexed. Otherwise it sends mixed signals and wastes crawl effort.
Exercise
A product page is available at /shoes?color=red and /shoes. Both show nearly the same content. Name two things you can do to tell Google which URL to prefer, and one way to confirm the result.
Show answer
Add <link rel="canonical" href="https://www.example.com/shoes"> to both versions, and use the preferred URL consistently in internal links and the sitemap (a 301 redirect is another option if the parameter version is not needed). Confirm with the URL Inspection tool, which shows the Google-selected canonical.