{"id":162,"date":"2026-01-20T00:00:00","date_gmt":"2026-01-20T00:00:00","guid":{"rendered":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/01\/20\/ai-search-ai-search-path-filtering-for-website-and-r2-data-sources-2\/"},"modified":"2026-01-20T00:00:00","modified_gmt":"2026-01-20T00:00:00","slug":"ai-search-ai-search-path-filtering-for-website-and-r2-data-sources-2","status":"publish","type":"post","link":"https:\/\/wordpress.securinsight.ca\/index.php\/2026\/01\/20\/ai-search-ai-search-path-filtering-for-website-and-r2-data-sources-2\/","title":{"rendered":"AI Search &#8211; AI Search path filtering for website and R2 data sources"},"content":{"rendered":"<p><a href=\"https:\/\/developers.cloudflare.com\/ai-search\/\">AI Search<\/a> now includes <a href=\"https:\/\/developers.cloudflare.com\/ai-search\/configuration\/path-filtering\/\">path filtering<\/a> for both <a href=\"https:\/\/developers.cloudflare.com\/ai-search\/configuration\/data-source\/website\/#path-filtering\">website<\/a> and <a href=\"https:\/\/developers.cloudflare.com\/ai-search\/configuration\/data-source\/r2\/#path-filtering\">R2<\/a> data sources. You can now control which content gets indexed by defining include and exclude rules for paths.<\/p>\n<p>By controlling what gets indexed, you can improve the relevance and quality of your search results. You can also use path filtering to split a single data source across multiple AI Search instances for specialized search experiences.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/developers.cloudflare.com\/_astro\/path-filtering.BCH7HN-Q_Z1KU9Rf.webp\" alt=\"Path filtering configuration in AI Search\" \/><\/p>\n<p>Path filtering uses <a href=\"https:\/\/github.com\/micromatch\/micromatch\" target=\"_blank\">micromatch<\/a> patterns, so you can use <code>*<\/code> to match within a directory and <code>**<\/code> to match across directories.<\/p>\n<table>\n<thead>\n<tr>\n<th>Use case<\/th>\n<th>Include<\/th>\n<th>Exclude<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Index docs but skip drafts<\/td>\n<td><code>**\/docs\/**<\/code><\/td>\n<td><code>**\/docs\/drafts\/**<\/code><\/td>\n<\/tr>\n<tr>\n<td>Keep admin pages out of results<\/td>\n<td>\u2014<\/td>\n<td><code>**\/admin\/**<\/code><\/td>\n<\/tr>\n<tr>\n<td>Index only English content<\/td>\n<td><code>**\/en\/**<\/code><\/td>\n<td>\u2014<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Configure path filters when creating a new instance or update them anytime from <strong>Settings<\/strong>. Check out <a href=\"https:\/\/developers.cloudflare.com\/ai-search\/configuration\/path-filtering\/\">path filtering<\/a> to learn more.<\/p>","protected":false},"excerpt":{"rendered":"<p>AI Search now includes path filtering for both website and R2 data sources. You can now control which content gets indexed by defining include and exclude rules for paths. By controlling what gets indexed, you can improve the relevance and quality of your search results. You can also use path filtering to split a single [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-162","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/162","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/comments?post=162"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/posts\/162\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/media?parent=162"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/categories?post=162"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.securinsight.ca\/index.php\/wp-json\/wp\/v2\/tags?post=162"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}