●  A visual field guide by Sarath G β€” Cybersecurity Trainer & Consultant

Here's how a website can become completely untraceable β€” and why Google only ever sees a fraction of the internet.

Scroll through the actual mechanism: crawling, the three layers of the web, and exactly how Tor moves your traffic through relays, circuits, and layers of encryption β€” peeled apart step by step, with no jargon left undefined.

↓ Scroll to begin
Before surface, deep, or dark web β€” two words

How search engines even find anything

Two mechanics explain everything that follows. Get these right and "deep web" and "dark web" stop being spooky terms β€” they're just answers to one plain question: could a crawler get in here or not?

Step 1

Crawling

An automated program β€” a crawler or spider β€” visits a webpage and reads through everything on it. Think of a librarian walking down every aisle of a library, opening every book, and reading every page.

Step 2

Indexing

Organizing what was crawled by keyword into a searchable catalog. That same librarian writes down which books mention which topics, so next time you ask, she can point you straight to the right shelf β€” instantly.

Indexing depends on crawling succeeding first. You can't index a page that was never crawled. Keep that one fact in your back pocket β€” it's the seed that the entire surface / deep / dark web split grows out of.
Same internet, three different levels of visibility

Surface web, deep web, dark web

Same underlying internet. The difference is purely whether a crawler could get in, and how deliberately something is hidden. Tap a layer.

Surface
Deep
Dark

Surface web

~4–10% of the internet

Fully indexed by search engines and freely accessible to anyone β€” no login required. This is what you touch every time you Google something. Sources disagree on the exact share, so treat any single fixed percentage you see elsewhere with suspicion β€” the honest answer is "a small slice, roughly 4–10%."

Example: any public blog post, a news homepage, a Wikipedia article.

Deep web

the majority of the internet

Not fully indexed, OR requires a login β€” either condition on its own qualifies a page as deep web. It's usually unindexed for boring technical reasons: crawlers can't get past a login wall, can't follow a link that's generated on the fly, are told to stay out by a robots.txt file, or simply have no other page linking in to them.

Everyday examples: your online banking dashboard, a paywalled academic journal, a company's internal intranet, your email inbox.

Edge case worth knowing: a paywalled news article where Google can show you the headline and first paragraph, but not the full text. That's still deep web β€” Google can see the cover of the book, but was never allowed to read the pages inside.

Dark web

a hidden slice of the deep web

A deliberately hidden subset of the deep web β€” you need special anonymizing software to even reach it. Tor is the most common route in, but it isn't the only one; I2P and Freenet are others.

The concealment here is different in kind, not just degree β€” it works at the network level. .onion addresses can't be looked up through normal DNS the way "google.com" can, and hidden services use a "meeting in the middle" system (more on that later) so that neither the visitor nor the website ever learns the other's real IP address.

Dark web β‰  automatically illegal. It's an anonymity technology, not a content category. Legitimate uses include SecureDrop whistleblower drop-boxes, and .onion mirrors of outlets like the BBC and the New York Times used by journalists and activists under censorship. It also hosts illicit markets. Both of those things are simultaneously true.

Using Tor itself is legal in most countries. A handful β€” Russia, China, Iran among them β€” restrict or block it at the network level. What makes something illegal is what you do on it, not the software itself.
The building blocks of Tor

Relays, circuits, and the fog between neighbors

Before we watch data move, four small words need to be nailed down β€” the rest of this page leans on them constantly.

Relay β€” a server that's part of the Tor network. Anyone can volunteer to run one.

Circuit β€” a connection between two relays. Every circuit has its own Circuit ID.

Circuit ID β€” a purely local label, only meaningful on one specific link between two neighboring relays. It is not one global ID that follows your traffic the whole way through. Client↔Entry has one Circuit ID, Entry↔Middle has a completely different one, Middle↔Exit has yet another. No single relay ever sees one ID spanning the full journey.

Circuit state β€” the private bookkeeping table each relay keeps: "traffic on Circuit ID X, coming in from my left neighbor, maps to Circuit ID Y going out to my right neighbor β€” and here are the keys for this hop." That table is the mapping itself, distinct from a Circuit ID, which is just a label stamped on a packet.

Three different Circuit IDs, three separate local labels. Each relay only ever knows its own two immediate neighbors β€” never the full path.

In: neighborIn: Circuit IDOut: neighborOut: Circuit ID
You (browser)41Middle relay9
↑ this is the entry relay's entire private circuit-state table for your connection. It has no idea what's beyond the middle relay.
Before a single byte of your request moves

How the tunnel and all six keys get built

This is the part people usually get wrong: the entire three-relay tunnel β€” and every key it needs β€” is fully negotiated before your actual request is ever sent. Nothing is built on the fly, mid-journey.

1

Browser picks three relays

One entry, one middle, one exit β€” chosen for this tunnel only.

2

Private handshake, directly with entry

The browser negotiates two keys with the entry relay: a forward key (Kf) that encrypts client→relay traffic, and a backward key (Kb) for relay→client traffic. The entry relay never learns any other relay's keys.

Kf₁ Β· Kb₁ β€” Entry
3

Tunneling through entry, a separate handshake with middle

Entry just relays the sealed handshake message without understanding it β€” it can't read the contents. Two more keys result, known only to the browser and the middle relay.

Kf₁ Β· Kb₁ β€” EntryKfβ‚‚ Β· Kbβ‚‚ β€” Middle
4

Tunneling through both, a separate handshake with exit

Same pattern, one hop further. Two more keys result.

Kf₁ Β· Kb₁ β€” EntryKfβ‚‚ Β· Kbβ‚‚ β€” MiddleKf₃ Β· Kb₃ β€” Exit
5

Only now β€” all six keys in hand β€” does the real request go out

Wrapped in three layers of encryption, one per relay.

Critical accuracy point: it is always browser ↔ individual relay, negotiated directly. Never relay-to-relay. No relay is ever "handed" a key by another relay or by any third party β€” each one builds its own unique key pair together with the browser, one-on-one.
↻

This tunnel typically stays up and gets reused for multiple site visits in one session, then rotates β€” roughly every 10 minutes. It isn't rebuilt before every single click.

Watch it happen Β· clearnet site (e.g. google.com)

Full data flow to an ordinary website

Same tunnel from the last section, now carrying real traffic. Step through it β€” watch the envelope pick up layers, then lose them one at a time.

Entry's layer
Middle's layer
Exit's layer
Plaintext
πŸ–₯
You
Entry
Step 1 Β· Wrapping
Browser wraps the request three times
Innermost layer = exit's key. Then middle's key. Then entry's key on the outside. It's sealed like a nesting doll before it ever leaves your device.
EN
Entry relay
Middle
Step 2 Β· First peel
Entry relay peels only its own outer layer
It checks its private circuit-state table β€” "traffic from this real IP β†’ forward via this Circuit ID to the middle relay" β€” and passes on what's left. Entry is the only relay that ever knows your real IP.
MID
Middle relay
Exit
Step 3 Β· Second peel
Middle relay peels its layer
Checks its own table β€” "traffic in on entry's Circuit ID β†’ forward out on a different Circuit ID to exit" β€” and forwards it. The middle relay knows neither your IP nor the final destination.
EX
Exit relay
🌐
google.com
Step 4 Β· Final peel
Exit relay peels the last layer
The actual plain request is revealed. Exit relay knows the destination, but not who you are β€” it sends the plaintext request onward to the real website.
🌐
google.com
EX
Exit relay
Step 5 Β· Reply begins
Website replies β€” to the exit relay
The website only ever sees the exit relay's IP address. It never learns yours.
EX
Exit relay
MID
Middle
Step 6 Β· Re-wrapping begins
Exit encrypts the reply with its backward key
Sends it on to the middle relay, using the Circuit ID for that hop.
MID
Middle relay
EN
Entry
Step 7 Β· Second wrap
Middle adds its own layer
Forwards it on to the entry relay.
EN
Entry relay
πŸ–₯
You
Step 8 Β· Final wrap
Entry adds its layer
Sends the fully re-wrapped reply β€” three layers again β€” back to your browser.
πŸ–₯
You
Step 9 Β· Fully unwrapped
Browser peels all three layers and shows you the page
It's the only party holding all six keys, so it's the only party that can undo every layer in one shot. No relay, at any point, needed to know the whole path β€” each one only ever used its own local circuit-state table, forward and backward.
Watch it happen Β· a hidden .onion service

Full data flow to a hidden service

Same building blocks β€” relays, circuits, layered encryption β€” arranged differently. The one thing to hold onto: your browser never learns the hidden service's real IP address, at any point. That's the entire point of a hidden service.

Visitor's own tunnel relays
Website's own tunnel relays
Introduction point
Meeting relay (rendezvous)
πŸ•Έ
Hidden website
IP
Introduction points
Step 1 Β· Setup (in advance, no visitor yet)
The website picks a few introduction points
It builds long-term tunnels to each of them β€” before anyone has even tried to visit.
πŸ•Έ
Hidden website
πŸ“‡
Lookup system
Step 2 Β· Setup
Website publishes a small descriptor
Tied to its .onion address, listing who its introduction points are β€” nothing about its real IP.
πŸ–₯
You
πŸ“‡
Lookup system
Step 3 Β· Visitor side begins
Browser looks up the .onion address
Retrieves the descriptor and learns who the introduction points are β€” not the website's IP. Only its introduction points.
πŸ–₯
You
EN
Entry
MID
Middle
RP
Meeting relay
Step 4
Browser builds its own 3-hop tunnel
Entry β†’ middle β†’ a random relay it picks. No exit node here β€” this stays entirely inside Tor. That last relay becomes the meeting relay (rendezvous point).
πŸ–₯
You
IP
Introduction point
Step 5
Using a different tunnel, browser sends a note
To one of the website's introduction points: "here's my meeting relay's address, and a one-time secret code." A separate 3-hop tunnel from the one built in step 4.
IP
Introduction point
πŸ•Έ
Hidden website
Step 6
Introduction point forwards the note to the website
Via the long-term tunnel from step 1. Its one job in this whole flow, done.
πŸ•Έ
Hidden website
Step 7 Β· Website side, triggered
Website reads the note
Learns the meeting relay's address and the secret code. This note is the trigger β€” the website does nothing until it arrives.
πŸ•Έ
Website
EN
Its entry
MID
Its middle
RP
Meeting relay
Step 8
Website builds its own fresh 3-hop tunnel
Its own entry β†’ middle β†’ last relay, straight to that same meeting relay. Again β€” no exit node, stays inside Tor.
πŸ•Έ
Website
RP
Meeting relay
Step 9
Website sends the matching secret code
Proving to the meeting relay that it received the note correctly.
RP
Meeting relay
Step 10 Β· Connection established
Meeting relay checks that both secret codes match
One from the visitor's side (step 5), one from the website's side (step 9).
EN
Your tunnel
RP
Meeting relay
EN
Website's tunnel
Step 11 Β· Live
Meeting relay just sits between the two tunnels
Passing encrypted messages back and forth. It never decrypts the content β€” it's a neutral joining point, nothing more. From here on, data flows with identical mechanics to the clearnet case: each relay only ever knows its own two neighbors and forwards using its local circuit-state table. The only structural difference β€” two separate tunnels meet in the middle instead of one tunnel ending at an exit node, and neither side ever leaves the Tor network.
Why this matters beyond trivia

This is infrastructure knowledge, not folklore

Understanding how relays, circuits, and hidden services actually work isn't just satisfying β€” it's directly useful for threat intelligence and pentesting work, where knowing what Tor can and can't hide (and where the actual weak points are) matters far more than treating it as a mysterious black box.

Who wrote this

I'm Sarath β€” a cybersecurity trainer and consultant with 9+ years in the field. I've trained teams at organizations including:

Indian Navy Samsung Electronics IIT Madras Central banks