Yukesh ChaudharyFounder · Niguro
Say namaste

Insights /Guide

How search engines work: crawling, indexing and ranking

A search engine finds pages, stores them in an index, then ranks a few for each query. Here is how each stage works, from crawl budget to ranking signals.

How search engines crawl, index and rank, by Yukesh Chaudhary

Every search engine does three jobs. It finds pages (crawling), it reads and stores them (indexing), and when someone types a query it picks and orders the best few out of billions (ranking). Google describes the same three stages in its own How Search works documentation, and adds a detail most people skip: not every page makes it through all three.

I run Niguro, Nepal’s own search engine, so I spend a lot of time thinking about these stages from the builder’s side. What follows is how search engines work in general, based on public documentation and the standard ideas in information retrieval. I won’t describe Niguro’s internals here. The goal is to give you a working mental model, because once you see the pipeline, most SEO advice stops looking like magic and starts looking like plumbing.

This article is the starting point for the How search engines work hub. If you want the slower, book-length version of the same ideas, my free book SEO Simply: How Search Engines Think walks through them chapter by chapter.

How search engines discover pages

A search engine can’t crawl a page it doesn’t know exists. Discovery is the step before crawling, and it mostly comes from three places: links on pages the engine already knows, sitemaps that site owners submit, and URLs it has seen before. Google lists exactly these sources in its documentation.

Links are still the main road. When a crawler fetches a page, it pulls out every link and adds the new URLs to a queue. A page with no internal links pointing to it (an orphan page) can only be found through a sitemap or an outside link, and engines tend to treat such pages as less important because nothing on your own site vouches for them.

Some engines also accept direct pings. IndexNow, supported by Bing, Yandex and others, lets a site tell the engine “these URLs changed” the moment it publishes. My own site sends IndexNow pings on publish, and so does every deploy of Siri Commands. Google doesn’t use IndexNow, so for Google the sitemap and internal links do that job. I cover the setup in sitemaps, robots.txt and IndexNow.

Crawling: scheduling, crawl budget and politeness

Discovery fills a queue far larger than any crawler can fetch at once. So the real work is scheduling: deciding which URL to fetch next, how often to come back, and how hard to hit each server. Google says its crawler uses an algorithm to decide which sites to crawl, how often, and how many pages to fetch from each one.

Google’s crawl budget guide splits this into two parts. The crawl capacity limit is how much your server can take; it goes up when your site responds fast and consistently, and down when it slows or returns 5xx errors. Crawl demand is how much the engine wants your URLs, driven by how many URLs it knows about, how popular they are, and how stale its copy is.

Here’s my honest take on crawl budget: most sites don’t need to worry about it. Google’s own guide is aimed at sites with around a million pages, or 10,000 or more pages that change daily. If you run a 300-page business site, your problem is almost never budget. It’s usually that the engine doesn’t think the pages are worth keeping, which is an indexing and quality question.

What does waste crawling on any site is junk URLs: faceted filters, session parameters, endless calendar pages, duplicate print versions. Every one of those is a fetch that could have gone to a page you care about. Google calls this “perceived inventory” and says it is the factor site owners control most.

Rendering JavaScript

Fetching the HTML is only half the story for modern sites. If your content is built by JavaScript in the browser, the engine has to run that code to see it. Google renders pages with a recent version of Chrome, and its JavaScript SEO basics page describes a separate render queue: a page is crawled, waits to be rendered (usually seconds, sometimes longer), and the rendered HTML is what gets indexed.

Rendering is expensive, and not every engine does it as thoroughly as Google. That’s why I’d still put your main text, links and title in the initial HTML wherever you can. One sharp edge to know: if the original HTML carries a noindex tag, Google may skip rendering entirely, so JavaScript that later removes the noindex may never run.

Indexing: parsing, canonicals and duplicate clusters

Once a page is fetched and rendered, the engine parses it. It pulls out the visible text, the title element, headings, image alt text, structured data, links and their anchor text, the language, and dozens of technical facts like the status code and whether the page is mobile friendly. Boilerplate such as menus and footers gets separated from the main content so it doesn’t dilute what the page is about.

Then comes a step that surprises people: the engine groups near-identical pages into clusters and picks one as the canonical. Google says the canonical is the most representative page in the cluster, and the others become alternates. If you have the same product at /shoes?color=red, /shoes?ref=fb and /shoes, only one of those is likely to be the indexed version.

You can influence the choice, but you don’t make it alone. Google’s canonicalization guide ranks the signals: redirects and rel="canonical" are strong signals, sitemap inclusion is a weak one, and HTTPS is generally preferred over HTTP. When your signals disagree (a canonical tag pointing one way, internal links and the sitemap pointing another), the engine picks for you.

The inverted index

The core data structure behind almost every text search engine is the inverted index. Instead of storing “page 1 contains these words,” it stores the reverse: for each word, the list of pages that contain it, often with positions and other details. Looking up a word becomes a single fetch of a ready-made list, which is why search can answer in a fraction of a second across billions of documents.

A tiny hypothetical: page A says “momo recipe Kathmandu” and page B says “best momo in Lalitpur.” The index entry for “momo” lists A and B; “Lalitpur” lists only B. A query for “momo Lalitpur” intersects the two lists and gets B straight away. Real indexes add a lot on top (word positions for phrase matching, field information like “this word was in the title,” compression), but the idea is that simple.

Alongside the word index, engines store page-level signals. Google mentions language, the country a page targets, and usability. Indexing is not guaranteed: low quality, robots meta rules and some site designs keep pages out. If your pages are stuck at this stage, read why Google isn’t indexing your pages.

Diagram of the search engine pipeline: discovery, crawling and rendering, indexing, retrieval and ranking

Query understanding: what the searcher actually means

Before the engine looks anything up, it works on the query itself. That means splitting it into words (tokenizing), fixing spelling, expanding synonyms, recognizing names of things (entities) and guessing intent. “Jaguar speed” and “jaguar price” share a word but want different answers, one about an animal and one about a car.

Google names several systems for this in its guide to ranking systems. BERT helps it understand how combinations of words express meaning. RankBrain relates words to concepts so a page can rank without containing the exact search terms. Neural matching links concepts in queries to concepts in pages. The practical lesson for writers: you don’t need to repeat a keyword ten times, but you do need to cover the topic clearly enough that a machine can tell what the page is about.

Intent also decides the shape of the results page. A query like “weather Pokhara” wants a quick answer, “how to file VAT in Nepal” wants a guide, and “Daraz” wants one specific website. Engines learn these patterns, which is why the same ranking factors play out so differently across query types.

Retrieval then ranking: two very different steps

Ranking billions of pages for every query with heavy models would be far too slow. So engines work in stages. First, retrieval pulls a candidate set from the index quickly, using cheap scoring such as term matching. Then ranking runs more expensive scoring on those candidates only, often in more than one round, each round more careful than the last.

This matters for SEO in a way people rarely say out loud. If your page never makes it into the candidate set, no amount of quality signals can help it, because the ranker never sees it. Clear titles, headings and body text that actually contain the words and concepts people search for are how you get into the room. Everything else decides your seat.

After ranking, engines usually apply final adjustments. Google describes a deduplication system that hides near-identical results and a site diversity system that generally shows no more than two results from the same site in the top listings.

The ranking signals that matter most

Nobody outside a search company knows the exact weights, and they change by query type. Google says relevance depends on hundreds of factors. But the families of signals are well documented, and the table below is how I group them.

Signal familyWhat it asksWhat you control
RelevanceDoes this page answer this query?Topic coverage, title, headings, clear wording
Quality and helpfulnessIs it original, accurate and written for people?Depth, first-hand detail, sourcing, authorship
LinksDo other pages point to it, and with what words?Internal linking, content worth citing
FreshnessDoes this query need recent information?Real updates, accurate dates
Page experienceIs the page usable, fast and safe?Core Web Vitals, HTTPS, no intrusive pop-ups
ContextWho is searching, where, in which language, on what device?Language versions, local details, hreflang

Relevance and quality

Relevance comes first. Google’s page experience documentation says it will show the most relevant content “even if the page experience is sub-par.” Quality then separates the relevant pages from each other. Google’s helpful content system became part of its core ranking systems in March 2024, and it also runs systems for original content and reliable information.

Quality is judged mostly page by page, but Google says site-wide signals contribute too. That’s why a site full of thin pages can drag down its good ones, and why topic focus pays off. I wrote more about that in topical authority.

Links, freshness and page experience

Links remain a core signal. Google still lists link analysis and PageRank among its ranking systems, used to understand what pages are about and which might be most helpful. Anchor text tells the engine what the target page covers, which is why “click here” is a wasted link.

Freshness is query-dependent. For “election results” a day-old page is stale; for “how photosynthesis works” a well-written five-year-old page is fine. Changing the date without changing the content doesn’t fool anyone for long. Page experience is not one signal but a set; Google says Core Web Vitals are used by its ranking systems, but good scores alone don’t guarantee top positions.

Personalization and location

Google says the user’s location, language and device all affect results, and that the same query can return different results in different places. Search “tax office” in Biratnagar and in Butwal and you should see different pages. Checking your rankings from one laptop in one city tells you how you rank there, not everywhere.

What changes when a search engine serves one country

A global engine is built around the languages and habits of its biggest markets. An engine focused on one country, like Niguro for Nepal, faces a different set of problems. These are general challenges that any engine serving Nepali users has to deal with, and they’re useful for site owners to understand too.

Two scripts for one language

Nepali is written in Devanagari, but a huge share of people type it in Latin letters on their phones. “Kathmandu ko mausam,” “kathmandu mausam” and “काठमाडौंको मौसम” can all mean the same thing. Romanized Nepali has no fixed spelling, so one word can appear in five forms (“chha,” “cha,” “xa”). An engine has to treat these as related without merging words that only look alike.

Mixed-language queries

People mix languages inside one query all the time: “best momo near me Thamel,” “loksewa form kasari bharne,” “NEPSE today ko index.” Tokenizing, spelling correction and synonym expansion all get harder when the next word might be English, Nepali or Romanized Nepali. Devanagari text also brings its own details, such as different Unicode sequences that look the same on screen and need normalizing before they can match.

Thin local data

There are fewer pages in Nepali than in English, and many local businesses have no website at all, only a social media page. That means fewer links to learn from and fewer good answers to rank. If you publish clear, well-structured pages about Nepali topics, especially in Nepali, you’re filling a real gap. I make that case at more length in SEO in Nepal.

What this means for your website

Map each stage to one question and you have a simple checklist. If a page is missing from search, find the first stage where it fails, and fix that before anything else.

  1. Discovery: is the page linked from other pages on your site and listed in your sitemap?
  2. Crawling: does robots.txt allow it, and does the server return a fast 200?
  3. Rendering: is the main text in the HTML, or does it need JavaScript to appear?
  4. Indexing: is it the canonical version, free of noindex, and different enough from your other pages?
  5. Retrieval: does it plainly use the words and concepts people search for?
  6. Ranking: is it the most helpful answer, with links and a usable page to back it up?

Google also states that it doesn’t accept payment to crawl a site more often or rank it higher. There is no shortcut around the pipeline; there’s only making each stage easy.

FAQ

What is the difference between crawling and indexing?

Crawling is fetching a page. Indexing is analyzing that page and storing it so it can be shown in results. A page can be crawled and still not indexed, which is exactly what the “Crawled – currently not indexed” status in Google Search Console means.

How long does it take for Google to index a new page?

Google says crawling can take anywhere from a few days to a few weeks. Well-linked pages on sites Google already crawls often get picked up faster. Requesting indexing more than once for the same URL doesn’t speed it up.

Can you pay Google to rank higher?

No. Google says it doesn’t accept payment to rank pages higher or to crawl a site more often. Ads appear in labeled slots and are separate from the organic results.

Does Google understand Romanized Nepali?

It handles common Romanized Nepali queries reasonably, but spelling varies so much that results can be uneven. If your audience searches in both scripts, it helps to use the Devanagari terms and the common Romanized forms naturally on your pages.

Every other article on crawling, indexing and the engines themselves sits on the How search engines work hub. Start there if you want to go deeper on any one stage.

Add to preferred sources

Leave a Reply

Your email address will not be published. Required fields are marked *

More from Guide

All in topic

Keep exploring