Skip to content
Tutorials Center
My learning

Topics

Lesson 19 of 36 ยท Technical SEO

Site Architecture and URLs

Learn how to structure a website for search engines: flat hierarchies, internal linking, clean URLs, breadcrumbs and how to measure click depth with code.

Site architecture is the way your pages are organized and connected. Search engines discover pages by following links, and they use the shape of those links to guess which pages matter most. A clear structure helps crawlers find everything and helps visitors find what they came for.

In this lesson you will learn how to design a hierarchy, write URLs that are easy to read, use breadcrumbs, and measure how deep your pages sit.

Why architecture matters

A crawler starts at a known page, usually your home page, and follows links. Every page it reaches costs a little crawl time, and pages that sit many clicks from the start are visited less often and are seen as less important. Pages with no internal links at all are called orphan pages; a crawler may never find them unless they appear in a sitemap or on another site.

Good architecture gives you three things:

  • Discoverability. Every important page is reachable through normal links.
  • Context. Pages grouped under a topic hint at what each page is about.
  • Link equity flow. Pages that receive many internal links tend to be treated as more important.

Flat versus deep hierarchies

A flat structure keeps important pages within about three clicks of the home page. A deep structure buries pages under many levels. Neither number is a rule from search engines, but the principle holds: do not make a visitor (or a bot) work to reach your best content.

flowchart TD
  H["Home"] --> C1["Category: Running"]
  H --> C2["Category: Cycling"]
  C1 --> P1["Guide: Choosing shoes"]
  C1 --> P2["Guide: Training plans"]
  C2 --> P3["Guide: Bike sizing"]
  P2 --> P4["Article: 10K plan"]

A three-level hierarchy: home, categories, then guides and articles.

A common model is the hub and spoke (or topic cluster): a hub page covers a broad topic and links to detailed spoke pages, and each spoke links back to the hub. You will meet this again in Content Strategy and Topical Authority.

Clean URLs

A URL is both an address and a small piece of content that shows up in search results. Good URLs are:

  • Readable: /running/training-plans beats /index.php?cat=14&id=882.
  • Lowercase with hyphens between words. Search engines treat hyphens as word separators; underscores are not reliably treated that way.
  • Stable. Changing a URL means redirects and risk, so choose carefully the first time.
  • Short but descriptive. Drop filler words, but never stuff keywords.
  • Free of session IDs and tracking parameters in the canonical form.

Keep the folder structure consistent with the hierarchy. A page at /running/training-plans/10k tells everyone where it lives.

Dates in URLs (/2024/05/10k-plan) make evergreen content look old and make a later refresh awkward. Use them only for news-style content where the date really matters.

Parameters and facets

Query strings such as ?sort=price&color=red can create thousands of near-identical URLs. Decide which parameter combinations deserve indexing, and handle the rest with canonical tags, noindex, or robots rules (see Canonicals, Redirects and Duplicate Content).

Python Score a URL

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Internal linking

Internal links do three jobs: they let crawlers discover pages, they pass importance between pages, and their anchor text describes the target. Write anchor text that says what the destination is about ("training plan for a 10K") rather than "click here".

Practical rules:

  • Link to important pages from your navigation and from related content.
  • Use real <a href> links. Links that exist only as JavaScript click handlers may not be followed.
  • Give every page at least a few relevant incoming links; fix orphans.
  • Do not put hundreds of links in one block; links in the main content usually carry more context than footer links.

Breadcrumbs show where a page sits: Home > Running > Training plans. They help visitors move up a level, add internal links, and can be marked up with structured data so search results can show the path (see Structured Data and Schema Markup).

Breadcrumb navigation

Measuring click depth

Click depth is the minimum number of clicks from the home page to a page. You can compute it with a breadth-first search over your link graph.

Python Click depth and orphan pages

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is an orphan page?

    An orphan page has no incoming internal links, so crawlers cannot reach it by following links.
  2. 2. Which URL is best for SEO?

    Lowercase, hyphen-separated, descriptive and free of technology extensions or opaque parameters.
  3. 3. What does click depth measure?

    Click depth is the shortest path length from the home page, which you can calculate with breadth-first search.
  4. 4. Why should important links be real anchor elements?

    Search engines discover URLs from href attributes; purely script-driven navigation may not be followed.

Summary

  • Keep important pages within a few clicks of the home page and avoid orphans.
  • Use hub-and-spoke clusters to group related content.
  • Write short, lowercase, hyphenated, stable URLs; control parameters.
  • Use descriptive anchor text and real <a href> links.
  • Breadcrumbs help users and crawlers understand position.
  • Measure click depth with a link graph and breadth-first search.

Next: robots.txt and XML Sitemaps