Menu

robots.txt Wildcards: Test the URLs You Mean to Block
📰

robots.txt Wildcards: Test the URLs You Mean to Block

DEV Community: html·Uriel Bitton·11 days ago
#LamxlJoa
#devto2#devto#dev#rule#examples
Reading 0:00
15s threshold

For Google’s robots.txt interpretation, test a rule against actual URL examples before deploying it. A path prefix, a folder boundary, and an end-of-URL marker select different sets. The pattern can be valid while still blocking pages you intended to keep available.

The practical task is to compare two lists: the URLs your crawl policy should cover and the URLs the rule actually matches. This walkthrough uses a fictional documentation site. Its examples illustrate Google’s documented matching behavior; they are not a live crawler experiment or a claim about every AI crawler.

Write the intended URL set first

Imagine a public docs site with a working area at /draft/ , a useful published guide at /draft-guide , a standalone page at /draft , and a mixed-case legacy path at /Draft . The team wants Googlebot to avoid the working area while retaining the public guide.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.