Table of Contents

robots.txt

How robots.txt works in Dynamicweb 10

A robots.txt file tells search engine crawlers which parts of a website they should or should not crawl. This helps prevent indexing of areas such as admin pages, checkout flows, and other content that should stay out of search results.

In Dynamicweb, robots.txt is generated dynamically from website settings. You do not place a robots.txt file in /Files/System/wwwroot/.

How robots.txt works in Dynamicweb

Each website area contributes its own rules to the generated robots.txt output. In the Advanced tab of the website settings, you can configure:

  • Link to sitemap.xml to add a sitemap reference to robots.txt
  • Include products in sitemap.xml to include product URLs in the sitemap
  • Robots.txt to define crawl rules such as Disallow: /private/

Sitemaps 3

Example output:

User-agent: *
Disallow: /admin/
Disallow: /checkout/
Sitemap: https://example.com/sitemap.xml

An example of a robots.txt with Link to sitemap.xml enabled and access to /private/ disallowed:

Sitemaps 4

Configure robots.txt

To configure robots.txt:

  1. Open the Advanced tab of the website settings
  2. In the Robots.txt section, enter the crawl rules you want to expose
  3. Enable Link to sitemap.xml if you want to reference sitemap.xml

Dynamicweb serves the generated content on /robots.txt.

To top