Short answer
How to crawling website pages you control starts with robots.txt, a sitemap, and the URL Inspection tool, which show what a well-behaved crawler may fetch. Google says robots.txt manages crawler traffic and is not a way to keep a page out of Search. A sitemap lists URLs you think matter, and it does not guarantee indexing. The sitemap protocol caps one file at 50,000 URLs and 50MB.
Last verified against the sources listed below.
Key takeaways
- Google says a robots.txt file tells crawlers which URLs they can access. It does not hide a page from Search.
- Unless you disallow a path, Google says files are implicitly allowed for crawling.
- The robots.txt file must be named robots.txt and must live at the host root, encoded as UTF-8.
- A sitemap helps discovery. Google says removing a URL from it does not block crawling.
- sitemaps.org limits one sitemap file to 50,000 URLs and 50MB uncompressed.
- URL Inspection can show the indexed copy or run a live test. They are not the same result.
How to crawling website pages, for a site you publish, starts with the files a well-behaved bot is allowed to fetch. Google’s robots.txt guide is about that permission. It is not a scraper for someone else’s content.
How search engines work is the reason a crawler asks for pages at all. The steps below are the files and the Search Console checks that tell Google what it may request.
What you need
You need a host you control, a verified Search Console property for that host, and a plain-text editor that can save UTF-8. Google names Notepad, TextEdit, vi, and emacs. It tells you not to use a word processor, because the file can pick up characters crawlers do not expect.
RFC 9309 is the Robots Exclusion Protocol. Its abstract says the file lets a service owner control how automatic clients may access content, and it adds rules for errors and caching. Google’s create guide says respectable crawlers obey the file and other clients might not. A private path still needs a password.
You also need the list of paths that should stay crawlable. A word counter can show how long a path string is before you paste it into a disallow line. Length is not the rule. A wrong slash is.
Create the robots.txt file
Google’s create guide says one site has one robots.txt file, and it must sit at the root of the host. For https://www.example.com/ the file is https://www.example.com/robots.txt. A copy in a subdirectory does not control the host. A subdomain needs its own file.
- Create a file named robots.txt and save it as UTF-8.
- Add a group that starts with a User-agent line.
- Add a Disallow line only for a path you do not want that agent to crawl.
- Add an Allow line when a file inside a blocked path should stay crawlable.
- Add a Sitemap line with the full sitemap URL, including https.
- Upload the file to the host root, not to a folder.
- Open the URL in a private window and confirm the text is public.
Google’s sample blocks Googlebot from a /nogooglebot/ path, allows every other agent, and points at a sitemap. The guide says the allow-all group could be omitted, because the default is that agents may crawl the site.
Rules are case-sensitive. A group matches one user agent, and the first most specific group wins. Groups for the same agent are combined. An asterisk matches crawlers except AdsBot, which Google says must be named on its own line, and a comment starts with #.
The introduction says the file manages crawler traffic. It is the wrong tool for keeping an HTML page out of Google. Use noindex or a password for that. A blocked page can still appear as a URL with no description if other sites link to it.
Publish a sitemap
A sitemap is a file of the pages, videos, and other files you consider important, plus facts such as a last-modified time or a language alternate. Google says a CMS may already publish one.
Google’s overview says a linked site can be discovered without a sitemap. A sitemap still helps a large site, a new site with few links, or a site with a lot of video, images, or news. A small site, about 500 pages or fewer that you want in results, may not need one if internal links are complete.
The sitemap protocol says each sitemap file must have no more than 50,000 URLs and must be no larger than 50MB, which it states as 52,428,800 bytes. You may gzip the file. The uncompressed file must still be no larger than 50MB. Use a sitemap index if you need more than one file.
In robots.txt, the Sitemap line must be a full URL. Google says it does not guess http, https, or a www alternate. Putting the line in robots.txt does not replace a correct file at that URL.
Check one URL in Search Console
After the files are public, Google’s create guide says crawlers will find robots.txt on their own. You can still test the markup. Search Console’s robots.txt report works for a file that is already on the site. Developers can also use Google’s open-source robots.txt library locally.
Then inspect a page you expect Google to fetch. The URL Inspection tool shows Google’s indexed version of a URL and can test whether the live URL might be indexable.
- Open URL Inspection in the property that owns the host.
- Paste the exact URL, including the protocol.
- Read the indexed status before you request anything.
- Open the crawl section to see whether Google fetched the page and what blocked it.
- Run the live test if you changed the page after the last crawl.
- Request indexing only when the live test matches the page you want fetched.
The help page says the indexed report is not a live test. “URL is on Google” means the URL can appear in results and that listed enhancements had no problems. It does not guarantee a ranking.
The Google-selected canonical is read from indexed data. The live test does not predict the canonical.
Technical SEO is where this check sits next to status codes and internal links. A crawl permission does not rewrite a broken canonical.
How to crawling data Google already stored
How to crawling data, in this guide, means reading the fetch Google already recorded for your property. URL Inspection is that record. The crawl section says whether Google could fetch the URL, when it did, and what got in the way. If the status is that the URL is not on Google, the reason is usually in that section.
View crawled page shows the HTTP request, the response, and the HTML, when the fetch worked. If the button is disabled, the help page says to hover it for the reason. The live test has a matching view for the current page.
Indexed video status and a live-test video detection are different. The live test reports that a video was detected, not that it is indexed.
Do not treat that panel as a license to copy another site. The data is about URLs in a property you verified. Crawl stats and an inspection report describe Google’s fetches. They are not an export of someone else’s database.
When the fetch fails
Use the message in URL Inspection or the robots.txt report. The fix is usually the file, the host, or a noindex you added on purpose.
| What you see | What Google’s docs say | What to change |
|---|---|---|
| URL shows with no description | A robots.txt block can leave the URL indexable without a snippet | Remove the disallow if you want the page crawled, or use noindex if you want it out of results |
| Rule seems to do nothing | Unsupported lines are ignored, and rules are case-sensitive | Match the path’s case and use Allow, Disallow, User-agent, or Sitemap |
| Sitemap URL never fetched | The Sitemap value must be a full URL | Write the https URL you can open in a browser |
| Live page differs from the report | The default report is the last indexed copy | Run the live test, then request indexing |
| File exists but not at the root | Only the root robots.txt applies to that host and port | Move it to /robots.txt on that host |
| Private page still leaks | Other crawlers may ignore robots.txt | Password-protect the file |
Google last updated the robots.txt introduction on 2025-12-10 UTC and the create guide on 2025-11-21 UTC. The sitemap overview says it was updated 2026-11-27 UTC. Re-read those pages if a report label has moved. The protocol limits above are from sitemaps.org, not from a third-party checklist.
Frequently asked questions
How to crawling data from a site I do not own?
This guide does not cover that. Google's crawling documents are about the site you publish and the files you place at its root. robots.txt is a request to well-behaved crawlers, and RFC 9309 describes that protocol for the service owner. Fetching someone else's site against their robots.txt, a login wall, or a terms ban is a different act. Use Search Console on a property you verified. Read the crawl result Google already stored for your URLs.
Does Disallow remove a page from Google?
No. Google's robots.txt introduction says not to use the file to hide a web page from Search results. If other pages link to it with descriptive text, Google can still index the URL without visiting it. The result can show the address and no description. To keep a page out of results, Google names password protection or a noindex tag or header. Blocking a page in robots.txt can also hide the resources Google needs to understand it.
Do I need a sitemap on a small site?
Google says you might not, if the site is small, well linked, and light on media or news. Small, on that page, means about 500 pages or fewer that you want in results. You might need a sitemap if the site is large, new and short on links, or full of video, images, or news. A CMS such as WordPress, Wix, or Blogger may already expose a sitemap. Omitting a URL from the file does not stop Google from crawling it if another page links to it.
What is the difference between the index view and the live test?
Search Console's URL Inspection help says the default report is the indexed version, not a live fetch. The page may have changed since Google last saw it. The Live Test button fetches the current page as Google would see it. The Google-selected canonical is available on the indexed data. The help page says the live test cannot predict whether that version will be chosen as canonical. Request indexing only after the live test matches the page you meant to publish.
Why did Google ignore a robots.txt line?
Google's create guide says lines that do not match its supported rules are ignored. Rules are case-sensitive, so a disallow for file.asp does not match FILE.asp. A word processor can insert curly quotes and break the file. The sitemap rule must be a full URL, because Google does not assume an http or www alternate. A file in a subdirectory is not the site's robots.txt. Only the root file applies, and it applies only to that protocol, host, and port.
Sources
- Robots.txt introduction · Google Search Central, 2025
- Create a robots.txt file · Google Search Central, 2025
- Sitemap overview · Google Search Central, 2026
- URL Inspection tool · Google Search Console Help, 2026
- RFC 9309, Robots Exclusion Protocol · IETF, 2022
- Sitemap protocol · sitemaps.org, 2026