WordPress robots.txt Setup
Configure your virtual crawling boundaries to maximize Googlebot crawl budget.
A robots.txt file is a roadmap telling search engine bots which directories to scan and which ones to avoid. For WordPress sites, an unoptimized configuration can lead to search bots wasting crawl budget on core PHP systems, search query parameters, or admin scripts.
By default, WordPress generates a generic virtual robots file. For maximum SEO efficiency and crawl protection, you should replace it with this highly optimized production template:
User-agent: * Disallow: /wp-admin/ Allow: /wp-admin/admin-ajax.php Disallow: /wp-includes/ Allow: /wp-includes/js/ Allow: /wp-includes/css/ Disallow: /search/ Disallow: *?s= Disallow: */feed/ Disallow: */trackback/ Sitemap: https://webkernelai.com/sitemap.xml
Let's break down why this configuration is essential for your WordPress installation:
/wp-admin/ is disallowed, we explicitly Allow: /wp-admin/admin-ajax.php. WordPress plugins and themes require this endpoint to load dynamic front-end assets and interactive functions./wp-includes/ completely is a legacy mistake. Modern crawler bots render pages just like web browsers. Googlebot needs access to critical Javascript/CSS assets located inside /wp-includes/js/ and /wp-includes/css/to evaluate core web vitals and mobile responsiveness./feed/) and internal search strings (?s=) add no indexation value and pollute crawler queues. Blocking them prevents severe indexing waste.A common Search Console warning is "Submitted URL blocked by robots.txt". This happens when you instruct Google to ignore a directory in robots.txt, but subsequently submit URLs from that same directory inside your XML sitemap. Ensure your sitemap generates automatically and dynamically to exclude any path disallowed in your crawl policies.
Our WordPress Malware & SEO Scanner automatically evaluates your robots.txt file, verifying resource access and checking for blocking loops.
Scan WordPress SiteContinue with these guides to strengthen your technical SEO workflow.