User-agent: * Allow: / # ───────────────────────────────────────────────────────────────────────────── # WHY SO FEW Disallow RULES — read before adding one. # # robots.txt controls CRAWLING, not INDEXING. Those are different things, and # confusing them is what caused two separate Search Console problems here: # # 1. "Indexed, though blocked by robots.txt" # /login, /signup, /cart, /checkout, /profile already send # `noindex, nofollow` (as a meta tag from app.component.ts AND an # X-Robots-Tag header from app.routes.server.ts). They were ALSO # disallowed below. A disallowed URL is never fetched, so Google never # saw the noindex — but the navbar links /login and /signup from every # page on the site, so Google knew the URLs existed and indexed them # URL-only. Blocking made them permanently un-removable. # # 2. "Blocked by robots.txt" (~110 URLs) # /book-detail/ was disallowed. It now 301s to /books/ # (frontend/src/server.ts). A redirect on an uncrawlable URL is invisible: # the old URLs kept their accumulated ranking signals and passed none on. # # The rule of thumb: to keep a page OUT of the index, let Google crawl it and # serve noindex. Only disallow things that must never be fetched at all # (private files, API endpoints) — and those must not rely on noindex. # ───────────────────────────────────────────────────────────────────────────── # API endpoints — pure crawl-budget waste, and they serve JSON, not HTML, # so there is no noindex mechanism to rely on. Blocking is correct here. Disallow: /api/ # Admin UI. Nothing links to it publicly, so there is no discovery path and # no index risk; blocking keeps it out of the crawl budget entirely. Disallow: /admin/ # Paid book files must never be fetched. Cover/article images stay crawlable # so link previews and Google Images keep working. Disallow: /uploads/books/ Allow: /uploads/images/ Sitemap: https://www.darelahram.com/sitemap.xml