Exclude from crawling
New in version 14.0.0
Editors can exclude a page from crawling in the page properties, like Exclude from search. No crawler configuration has to be changed.
Open the page properties, go to the Behavior tab and use the Crawler section:
- Exclude from crawling
- The crawler skips this page. Its subpages are still crawled.
- Exclude subpages from crawling
- Only together with Exclude from crawling: the crawler also skips all subpages of this page, on every level. Enabled on a page that is not excluded itself, the option does nothing.
The options apply to every crawler configuration, from page TSconfig and from
configuration records. They are stored in the fields tx_ and
tx_ of the pages table.
Example
Root
├── Page1 "Exclude from crawling" → skipped
│ ├── subpage1 → crawled
│ ├── subpage2 "Exclude from crawling" + "Exclude subpages from crawling" → skipped
│ │ ├── subsubpage1 → skipped
│ │ └── subsubpage2 → skipped
│ └── subpage3 → crawled
├── Page2 → crawled
└── Page3 → crawled
How it works
Before the URLs of a page are added to the queue, the crawler checks whether
the page should be skipped, see
AOECrawler. Besides
hidden pages and excluded page types, it reads the rootline of the page and
skips the page if
- the page itself has Exclude from crawling enabled, or
- a parent page, on any level, has both Exclude from crawling and Exclude subpages from crawling enabled.
This applies to everything that adds pages to the queue: the
Start Crawling backend module, the crawler: command and
adding pages automatically when they are edited or their
cache is cleared.
The Start Crawling module and the queue mode of
crawler: show why a page is skipped:
Because page is excluded from crawlingBecause parent page "4" is excluded from crawling with its subpages
Pages that are already in the queue when they are excluded are not crawled
either: the worker (messenger:) checks the exclusion again right
before it crawls a URL. The queue entry is marked as processed without
crawling, and the Crawler log shows the reason as status, fx.
Skipped: Because page is excluded from crawling. As the worker reads the
rootline from the database for every URL, a running worker picks up changes
of the exclusion right away, it does not have to be restarted.
Some details:
- The rootline follows the real location of a page in the page tree. A page that is crawled through a mount point is excluded by its own parent pages, not by the parents of the mount point.
- Translated pages use the options of the page in the default language.
- Deleted parent pages are not taken into account.
Exclude pages per configuration
To exclude pages from a single crawler configuration only, use the Exclude pages field of the configuration record. For exclusion rules of your own, listen to the ModifySkipPageEvent.