What is a Sitemap?
A sitemap is an XML file that lists all important pages on your website, helping search engines and AI crawlers discover and understand your content structure.
Why Sitemaps Matter for AI Search
AI platforms use sitemaps to:
π Discover all your content quickly
β±οΈ Understand when content was updated
π Prioritize which pages to crawl
π― Index your most important content first
Basic Sitemap Structure
<? xml version = "1.0" encoding = "UTF-8" ?>
< urlset xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" >
< url >
< loc > https://asklantern.com/ </ loc >
< lastmod > 2026-01-21 </ lastmod >
< changefreq > daily </ changefreq >
< priority > 1.0 </ priority >
</ url >
< url >
< loc > https://asklantern.com/blog/ai-search-guide </ loc >
< lastmod > 2026-01-20 </ lastmod >
< changefreq > weekly </ changefreq >
< priority > 0.8 </ priority >
</ url >
</ urlset >
Key Elements Explained
The full URL of the page. Must start with http:// or https:// < loc > https://asklantern.com/products/analytics </ loc >
<lastmod> - Last Modified
When the page was last updated. Helps AI crawlers prioritize fresh content. < lastmod > 2026-01-21 </ lastmod >
<changefreq> - Change Frequency
How often the page typically changes:
always - Changes every visit
hourly - Updates every hour
daily - Updates daily (blogs)
weekly - Updates weekly (product pages)
monthly - Updates monthly (evergreen content)
yearly - Rarely changes
never - Static content
< changefreq > weekly </ changefreq >
<priority> - Page Priority
Relative importance (0.0 to 1.0). Use 1.0 for your most important pages.
Sitemap Best Practices for AI Search
1. Prioritize High-Value Content
Set higher priorities for pages you want AI to cite:
<!-- Homepage - highest priority -->
< url >
< loc > https://asklantern.com/ </ loc >
< priority > 1.0 </ priority >
</ url >
<!-- Key product/service pages -->
< url >
< loc > https://asklantern.com/products/ai-analytics </ loc >
< priority > 0.9 </ priority >
</ url >
<!-- Blog posts and resources -->
< url >
< loc > https://asklantern.com/blog/ai-search-optimization </ loc >
< priority > 0.8 </ priority >
</ url >
2. Keep Content Fresh
Update lastmod dates when you update content:
< url >
< loc > https://asklantern.com/pricing </ loc >
< lastmod > 2026-01-21 </ lastmod >
< changefreq > monthly </ changefreq >
</ url >
3. Use Multiple Sitemaps
Split large sites into multiple sitemaps:
<!-- Sitemap index file -->
<? xml version = "1.0" encoding = "UTF-8" ?>
< sitemapindex xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" >
< sitemap >
< loc > https://asklantern.com/sitemap-pages.xml </ loc >
< lastmod > 2026-01-21 </ lastmod >
</ sitemap >
< sitemap >
< loc > https://asklantern.com/sitemap-blog.xml </ loc >
< lastmod > 2026-01-21 </ lastmod >
</ sitemap >
< sitemap >
< loc > https://asklantern.com/sitemap-products.xml </ loc >
< lastmod > 2026-01-20 </ lastmod >
</ sitemap >
</ sitemapindex >
4. Include Only Indexable Pages
Donβt include:
β Pages blocked by robots.txt
β Pages with noindex meta tags
β Login or admin pages
β Duplicate content
β 404 or redirecting pages
Complete Example
<? xml version = "1.0" encoding = "UTF-8" ?>
< urlset xmlns = "http://www.sitemaps.org/schemas/sitemap/0.9" >
<!-- Homepage -->
< url >
< loc > https://asklantern.com/ </ loc >
< lastmod > 2026-01-21 </ lastmod >
< changefreq > daily </ changefreq >
< priority > 1.0 </ priority >
</ url >
<!-- Main Product Pages -->
< url >
< loc > https://asklantern.com/products/ai-search-analytics </ loc >
< lastmod > 2026-01-20 </ lastmod >
< changefreq > weekly </ changefreq >
< priority > 0.9 </ priority >
</ url >
<!-- Documentation -->
< url >
< loc > https://asklantern.com/docs/getting-started </ loc >
< lastmod > 2026-01-18 </ lastmod >
< changefreq > weekly </ changefreq >
< priority > 0.8 </ priority >
</ url >
<!-- Blog Posts -->
< url >
< loc > https://asklantern.com/blog/optimize-for-ai-search </ loc >
< lastmod > 2026-01-15 </ lastmod >
< changefreq > monthly </ changefreq >
< priority > 0.7 </ priority >
</ url >
</ urlset >
Submitting Your Sitemap
Add to robots.txt
Reference your sitemap in your robots.txt file: Sitemap: https://asklantern.com/sitemap.xml
Submit to Google Search Console
Add your sitemap in Google Search Console to track indexing
Monitor with Lantern
Track which AI platforms are discovering and indexing your sitemap content
Automatic Sitemap Generation
Most platforms can auto-generate sitemaps:
WordPress
Next.js
Node.js
Use plugins like Yoast SEO or RankMath to auto-generate sitemaps
// next-sitemap.config.js
module . exports = {
siteUrl: 'https://asklantern.com' ,
generateRobotsTxt: true ,
changefreq: 'daily' ,
priority: 0.7 ,
}
const { SitemapStream , streamToPromise } = require ( 'sitemap' );
const sitemap = new SitemapStream ({
hostname: 'https://asklantern.com'
});
sitemap . write ({
url: '/products/' ,
changefreq: 'weekly' ,
priority: 0.9
});
Testing Your Sitemap
Validate XML Use an XML validator to check for syntax errors
Google Search Console Submit and monitor your sitemapβs indexing status
Lantern Dashboard Track AI crawler discovery and indexing rates
Manual Review Regularly check that all important pages are included
Sitemap Limits : Keep sitemaps under 50MB and 50,000 URLs. Use sitemap index files for larger sites.
Next Steps
Configure llms.txt Learn about the new llms.txt file specifically designed for AI platforms