Robots.txt file for Woocommerce.
What is a Robots.txt File
A robots.txt file tells search engines which parts of your WordPress website they can crawl and index. This file should be placed in your root directory.
It helps you control what search engine bots can crawl and index on your website. For example, you can block access to sensitive folders like wp-admin or wp-includes.
This keeps your backend safe and prevents duplicate content from showing up in search engine results. A well-structured robots.txt can also improve crawl efficiency.
If search engines waste time crawling and indexing unnecessary files, they may miss your important pages. Make sure you don’t accidentally block content you want to rank.
For a Woocommerce site, a common robots.txt might look like this:
User-agent: * Disallow: /wp-content/plugins/ Disallow: /wp-content/cache/ Sitemap: https://example.com/sitemap.xml |
Remember to replace your own website sitemap’s URL.
(Also make sure to rename the file to robots.txt before uploading it to your website)
It’s a good practice to review your robots.txt regularly. You can easily do that visiting https://yourwebsite.com/robots.txt
Testimonials from Our Clients
Read how our clients boosted growth, improved security, and strengthened their brand with CBN Tek