Everything you need to know about AIRanky - from installation to advanced customization with hooks, filters, and REST API.
AIRanky can be installed automatically through the WordPress admin or manually uploaded to your server.
After installation, follow these steps to set up AIRanky for your website.
AIRanky creates three main files for AI optimization:
Customize AIRanky settings to match your website's needs and preferences.
Configure structured content organization for AI models:
Safe AI bot access configuration:
AIRanky provides REST API endpoints for programmatic access to sitemap generation, file management, and status monitoring.
Retrieve the current sitemap-ai.xml content
GET /wp-json/airanky/v1/sitemap
Retrieve the current llms.txt content
GET /wp-json/airanky/v1/llms
Trigger file regeneration
POST /wp-json/airanky/v1/regenerate
Get current plugin status and file information
GET /wp-json/airanky/v1/status
AIRanky provides extensive hooks and filters for developers to customize functionality.
Modify sitemap content before generation
add_filter('airanky_sitemap_content', function($content) {
// Modify sitemap content
return $modified_content;
});
Modify llms.txt content before generation
add_filter('airanky_llms_content', function($content) {
// Modify llms.txt content
return $modified_content;
});
Modify robots.txt rules before generation
add_filter('airanky_robots_rules', function($rules) {
// Modify robots.txt rules
return $modified_rules;
});
Filter which post types to include
add_filter('airanky_post_types', function($post_types) {
// Add or remove post types
return $post_types;
});
Exclude specific posts from AI files
add_filter('airanky_exclude_posts', function($excluded_posts) {
// Add posts to exclude
$excluded_posts[] = 123; // Post ID
return $excluded_posts;
});
Practical examples of how to use AIRanky hooks and filters in your themes and plugins.
add_filter('airanky_sitemap_content', function($content) {
// Add custom pages to sitemap
$custom_pages = [
'about' => [
'url' => home_url('/about/'),
'lastmod' => date('Y-m-d'),
'priority' => '0.8',
'changefreq' => 'monthly'
]
];
foreach ($custom_pages as $page) {
$content .= "<url>\n";
$content .= " <loc>{$page['url']}</loc>\n";
$content .= " <lastmod>{$page['lastmod']}</lastmod>\n";
$content .= " <priority>{$page['priority']}</priority>\n";
$content .= " <changefreq>{$page['changefreq']}</changefreq>\n";
$content .= "</url>\n";
}
return $content;
});
add_filter('airanky_llms_content', function($content) {
// Add custom content sections
$custom_sections = [
'Custom Resources' => [
'description' => 'Additional resources for AI training',
'urls' => [
home_url('/api/docs/'),
home_url('/data-sets/'),
home_url('/research/')
]
]
];
foreach ($custom_sections as $title => $section) {
$content .= "\n## {$title}\n";
$content .= "{$section['description']}\n\n";
foreach ($section['urls'] as $url) {
$content .= "- {$url}\n";
}
}
return $content;
});
add_filter('airanky_robots_rules', function($rules) {
// Add custom AI bot rules
$custom_rules = [
'User-agent: CustomAIBot',
'Allow: /public-content/',
'Disallow: /private-content/',
'Crawl-delay: 1'
];
$rules = array_merge($rules, $custom_rules);
return $rules;
});
Common issues and their solutions when using AIRanky.
Possible causes:
Solutions:
Solution: AIRanky is designed to work alongside other SEO plugins. If conflicts occur:
Solutions:
Enable debug mode to get detailed information about file generation:
// Add to wp-config.php
define('AIRANKY_DEBUG', true);
Can't find what you're looking for? Our support team is here to help