Website & app builders · CMS · Checked 2026-10-18
WordPress SEO for ChatGPT, Perplexity & AI search
Built your site with WordPress? Here is what WordPress's own documentation says about how AI crawlers see it, and the exact settings for robots.txt, llms.txt, structured data and your sitemap. Sources are listed at the bottom.
Is your WordPress site visible to AI? Check it free
Paste your live URL. RankRoot checks your robots.txt rules for the ChatGPT, Perplexity and Claude crawlers, whether your page text is in the HTML without JavaScript, and your llms.txt and JSON-LD.
Free, no signup. 20+ checks across ChatGPT, Perplexity, Claude, Google AI and AI agents.
How WordPress delivers pages to crawlers
WordPress's developer docs say its template loader decides which theme template to load for each URL, and templates generate the page's document structure. Plugins or page builders that load content with JavaScript can change what crawlers see, so check your page source or run RankRoot's audit. This guide covers self-hosted WordPress (the WordPress.org software).
Why it matters: many AI crawlers don't run JavaScript. If your text only appears after scripts run, they may see an empty page.
What we found on 131 WordPress sites we track
Highest-scoring WordPress sites:
- Filestack (filestack.com): 100/100
- Cloudinary (cloudinary.com): 98/100
- Heroku (heroku.com): 98/100
- Krisp (krisp.ai): 98/100
- Mendel (mendel.com): 98/100
From the AI Visibility Index and our Y Combinator study, crawled up to 2026-10-18. Builder detected from each homepage's HTML.
Make your content readable without JavaScript
- Go to Settings > Reading and make sure Discourage search engines from indexing this site is unchecked. When it's checked, WordPress adds a
noindex, nofollowrobots meta tag to every page, and core sitemaps are disabled. - Run the free audit on your homepage and a post to confirm the content is in the HTML.
robots.txt: let AI search crawlers in
- WordPress outputs a virtual
robots.txt(thedo_robots()function). By default it containsUser-agent: *, a Disallow line for the admin path, an Allow line foradmin-ajax.php, and a reference to the core sitemap. - Add rules with the
robots_txtfilter in a small plugin or your theme'sfunctions.php. The filter receives the generated text and whether the site is public. - If a physical
robots.txtfile exists in your site's root folder, edit that file instead, then openyourdomain.com/robots.txtto see what's actually served. - SEO plugins often include a robots.txt editor. Our free WordPress plugin has presets such as "Allow AI search, block training".
add_filter( 'robots_txt', function ( $output, $public ) {
if ( ! $public ) {
return $output;
}
// A crawler that matches this group ignores the * group, so repeat the admin rules.
$output .= "\nUser-agent: OAI-SearchBot\nUser-agent: PerplexityBot\nUser-agent: Claude-SearchBot\nDisallow: /wp-admin/\nAllow: /wp-admin/admin-ajax.php\n";
return $output;
}, 10, 2 );Which bots to allow or block: robots.txt for AI crawlers and the AI crawler list.
Add llms.txt
- WordPress core has no llms.txt feature.
- On self-hosted WordPress you can upload a plain
llms.txtfile to the site's root folder (the one withwp-config.php) using your host's file manager or SFTP. Write it with the llms.txt generator. - Or use a plugin that builds it from your pages and posts, such as our free WordPress plugin. See the llms.txt for WordPress guide.
- Open
yourdomain.com/llms.txtand check it with the llms.txt validator.
Add JSON-LD and head code
- Themes call
wp_head()in the page<head>. Hook into thewp_headaction to print a JSON-LD script. - SEO plugins usually add Organization and WebSite schema already, so check your page source to avoid duplicates.
add_action( 'wp_head', function () {
if ( ! is_front_page() ) {
return;
}
$data = array(
'@context' => 'https://schema.org',
'@type' => 'Organization',
'name' => get_bloginfo( 'name' ),
'url' => home_url( '/' ),
);
echo '<script type="application/ld+json">' . wp_json_encode( $data ) . '</script>';
} );Sitemap
- Since WordPress 5.5, core publishes a sitemap index at
/wp-sitemap.xmland references it inrobots.txt. - Core sitemaps are disabled when the site discourages search engines. They can also be turned off with the
wp_sitemaps_enabledfilter, which some plugins do when they provide their own sitemap. - Submit whichever sitemap your site actually serves in Google Search Console.
Common mistakes
- Leaving "Discourage search engines" on after launch. WordPress adds noindex to every page and disables core sitemaps.
- Uploading a physical robots.txt and then wondering why filter- or plugin-based rules don't show up. Check what yourdomain.com/robots.txt actually returns.
- Outputting JSON-LD twice: once from the theme or an SEO plugin and once from custom code.
- Following self-hosted steps on a hosted WordPress plan that doesn't give you file or plugin access. Check what your host allows.
Rather have this done for you?
The AI Visibility Employee looks after AI visibility for your WordPress site every month, fully by email, no calls:
- Weekly tracking of how ChatGPT, Perplexity, Gemini and Claude mention you for your buyers' questions
- 4 answer-ready pages a month, published through our WordPress plugin or a GitHub pull request, or delivered as drafts you add in WordPress
- Ongoing llms.txt, robots.txt and JSON-LD fixes wherever your setup allows them, and a monthly report
$149/month, cancel anytime. The first 10 customers pay $99/month with code FOUNDING10.
See the AI Visibility EmployeeFAQ
Does WordPress create llms.txt?
Not in core. Upload a static llms.txt to your site root, or use a plugin that generates it, such as RankRoot's free WordPress plugin.
How do I edit robots.txt in WordPress?
WordPress serves a virtual robots.txt. Add rules with the robots_txt filter, an SEO plugin's editor, or, if a physical robots.txt exists in your site root, by editing that file.
Where is my WordPress sitemap?
Core WordPress (5.5 and later) publishes /wp-sitemap.xml unless the site discourages search engines or a plugin disables it to provide its own.
Is my WordPress site visible to ChatGPT?
WordPress builds pages from your theme's templates when they're requested, so content is normally in the HTML. Check that search engine visibility is on, robots.txt allows OAI-SearchBot, and run the free audit to confirm.
Sources
- WordPress Developer: Template hierarchy (read 2026-10-18)
- WordPress Developer: do_robots() (read 2026-10-18)
- WordPress Developer: robots_txt hook (read 2026-10-18)
- WordPress Developer: wp_head hook (read 2026-10-18)
- Make WordPress Core: New XML sitemaps functionality in WordPress 5.5 (read 2026-10-18)
- WordPress Documentation: Settings Reading screen (read 2026-10-18)
Facts checked against WordPress's documentation on 2026-10-18. RankRoot is not affiliated with WordPress. Settings move around; if a step has changed, email rankroot.support@proton.me.
Other builders
Lovable · Bolt.new · Replit · v0 · Framer · Webflow · Wix · Squarespace · Shopify · Ghost · GitHub Pages · Carrd · Hostinger AI Builder · Notion Sites · Netlify · Vercel · Cloudflare Pages & Workers