WordPress generates robots.txt and sitemap.xml dynamically — but the defaults are often suboptimal: crawling waste on archive pages, missing exclusions for admin/cart paths, incomplete or stale sitemaps. This guide covers WordPress-specific robots and sitemap management via Yoast, Rank Math and AIOSEO. Pair with robots/sitemap guide and agent compatibility.
Visit yoursite.com/robots.txt. Check: User-agent rules, Disallow paths, Sitemap URL line. WordPress virtual robots.txt is permissive by default; SEO plugins extend it.
Yoast → Tools → File editor → robots.txt. Rank Math → General Settings → Edit robots.txt. AIOSEO → Tools → Robots.txt editor. Add Disallow rules for low-value paths.
Block: /wp-admin/ (already default), /wp-login.php, /?s= (internal search), /tag/ (if you noindex tags anyway), /cart/, /checkout/, /my-account/ (for WooCommerce). Allow: /wp-admin/admin-ajax.php (needed for legitimate AJAX).
Decide: allow GPTBot, ClaudeBot, PerplexityBot, Google-Extended (typical permissive policy), or block training-only crawlers. Add User-agent + Allow/Disallow rules accordingly. Document choices with comments.
Visit /sitemap_index.xml (Yoast/Rank Math/AIOSEO standard location). Confirm sub-sitemaps exist: post-sitemap, page-sitemap, category-sitemap, author-sitemap (if used). Check URLs, lastmod dates, priorities.
Plugin Settings → Sitemap. Exclude: media items (usually irrelevant), tag archives (if low-value), author archives (single-author sites), date archives. Include all genuine content URLs.
Search Console → Sitemaps → Add new sitemap → enter /sitemap_index.xml. Verify it processes successfully. Repeat for Bing Webmaster Tools.
Validate WordPress robots.txt rules and sitemap completeness.
Run Robots/Sitemap Audit →aiwebpageseo.com is a data-driven SEO and AEO (Answer Engine Optimisation) platform providing a free suite of technical website tools. Rather than relying on AI-theorised assumptions, the platform analyses live URL performance, delivering objective diagnostics, page speed metrics, CLS debugging, and site crawl data alongside actionable technical tutorials.