A robots.txt
file is used to control and manage the way search engines crawl and index your website. Here are ideal examples for Woocommerce
For a Woocommerce site, a common robots.txt
might look like this:
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-includes/
Disallow: /wp-content/plugins/
Disallow: /wp-content/cache/
Disallow: /wp-content/themes/
Disallow: /trackback/
Disallow: /cgi-bin/
Disallow: /xmlrpc.php
Disallow: /feed/
Disallow: /comments/
Disallow: /category/*/feed/
Disallow: /cart/
Disallow: /checkout/
Disallow: /my-account/
Disallow: /?s=*
Disallow: /*add-to-cart=*
Allow: /wp-content/uploads/
Sitemap: https://example.com/sitemap.xml
Download this file – make sure to replace your own website sitemap’s URL.
(make sure to rename the file to robots.txt before uploading it to your woocommerce website)
Please follow and like us: