Sub topic 2
Blocking Crawling Is Not the Same as Blocking Indexing
Assume you understand URLs, HTTP status codes, basic XML, and how website directories are organized.
Blocking crawling is not the same as blocking indexing
Crawling is when a search engine requests a URL. Indexing is when it stores information about that URL. Ranking is how it orders indexed URLs in search results.
A robots.txt rule controls crawling:
User-agent: *
Disallow: /private/This asks cooperative crawlers not to request URLs under /private/. It does not guarantee that the URLs disappear from search results. A crawler might learn a blocked URL from links on other sites and index its address without fetching the page.
Use noindex when the crawler must access a page and see an instruction not to store it:
<meta name="robots" content="noindex">You can also send X-Robots-Tag: noindex in an HTTP response. Do not block the same URL in robots.txt when relying on noindex, because the crawler must read the page or response header.
Why robots.txt is not a security measure
robots.txt is publicly readable and depends on crawler cooperation. It does not authenticate users, encrypt content, or prevent direct requests. Never use it to protect passwords, customer data, or internal systems. Use authentication, authorization, and server-side access controls instead.
What an XML sitemap does and does not do
An XML sitemap lists URLs that you want search engines to discover. It can improve discovery of new, updated, or poorly linked pages. It does not require indexing, improve ranking by itself, or override noindex, canonical, or access restrictions.
Anatomy of a sitemap file
A sitemap uses a standard XML namespace. Each <url> contains an absolute <loc> value. Optional <lastmod> records the page's actual modification time.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://www.example.com/blog/first-post</loc>
<lastmod>2026-11-01</lastmod>
</url>
</urlset>Using `lastmod` honestly, and fields crawlers ignore
Set lastmod only when the page's meaningful content changed. Do not update every value on every deployment. Search engines may use accurate dates to prioritize revisits.
The older <priority> and <changefreq> fields are generally ignored by major search engines. Omit them unless a specific consumer requires them.
Exercise
A page must stay accessible to users but must not appear in search results. Should you use only Disallow in robots.txt?
Show answer
No. Let crawlers access the page and return a noindex directive.