Introduction
🎯 What does this module do?
The Sitemap module lets you retrieve and update the sitemap of your OneEntry project - a structured list of all pages on your website used by search engines to index your content efficiently.
Think of it as your SEO foundation - a sitemap tells search engines which pages exist, how often they change, and their relative importance, helping Google, Bing, and other crawlers discover and index your content faster.
📖 Simple Explanation
Every website needs a sitemap for SEO:
- 🗺️ Page Discovery - Search engines find all your pages automatically
- 🔄 Change Frequency - Tell crawlers how often pages update
- ⭐ Priority - Indicate which pages are most important
- 📅 Last Modified - Signal when pages were last updated
- 🚀 Faster Indexing - New pages get indexed sooner
Issues without a sitemap:
- 🔒 Hidden pages - Deep or unlinked pages never get indexed
- 📊 Slow indexing - Search engines find new content slowly
- 🔄 Outdated index - Crawlers don't know when content changes
The Sitemap solution:
Benefits:
- 🔒 Complete coverage - All pages submitted to search engines
- 📊 Crawl optimization - Efficient use of crawl budget
- 🔄 Fresh index - Search engines re-crawl updated pages faster
- 🚀 Better SEO - Improved discoverability and rankings
✨ Key Concepts
What is a Sitemap?
A Sitemap is an XML file listing all pages of your website:
- URL - The full address of each page
- Last Modified - When the page was last updated
- Change Frequency - How often the page typically changes
- Priority - Relative importance (0.0 to 1.0)
Sitemap Entry Structure
Each sitemap entry has this structure:
{
url: 'https://your-project.oneentry-cloud.com/catalog',
lastmod: '2025-06-01T00:00:00.000Z',
changefreq: 'weekly',
priority: 0.8,
}
Change Frequency Values
| Value | Meaning |
|---|---|
| always | Page changes every time it is accessed |
| hourly | Page changes every hour |
| daily | Page changes every day |
| weekly | Page changes every week |
| monthly | Page changes every month |
| yearly | Page changes once a year |
| never | Archived page, will not change |
Why Use Sitemap Module?
| Benefit | Description |
|---|---|
| Automated Generation | Sitemap auto-generated from your page structure |
| SEO Optimization | Better search engine crawling and indexing |
| Change Notifications | Search engines re-crawl modified pages faster |
| Priority Control | Guide crawlers to your most important pages |
📋 What You Need to Know
Sitemap is Generated from Your Pages
The sitemap is automatically built from your OneEntry page structure. Use getSitemap() to retrieve the current sitemap data.
Updating the Sitemap
Use updateSitemap() to refresh the sitemap after making significant content changes, ensuring search engines receive up-to-date information.
Submitting to Search Engines
After retrieving the sitemap data, generate an XML file and submit it to:
- Google Search Console
- Bing Webmaster Tools
- Other search engine webmaster tools
💡 Important Notes
The Sitemap module handles:
- ✅ Retrieve the full sitemap
- ✅ Update sitemap data
- ❌ Does NOT submit directly to search engines (you do that via webmaster tools)
Your responsibility:
- Generate XML file from sitemap data
- Submit to search engine webmaster tools
- Keep sitemap updated after major content changes
📊 Quick Reference Table
| Method | Description |
|---|---|
| getSitemap() | Get the current sitemap |
| updateSitemap() | Update sitemap data |
❓ Common Questions (FAQ)
How do I submit my sitemap to Google?
Retrieve your sitemap with getSitemap(), generate a valid sitemap.xml file from the response, host it at /sitemap.xml on your domain, then submit the URL in Google Search Console under Sitemaps.
How often should I update my sitemap?
Update your sitemap whenever you add new pages, significantly update existing content, or change your site structure. For high-traffic sites, consider automated updates triggered by content changes.
What does the priority field mean?
Priority (0.0 to 1.0) is a hint to search engines about the relative importance of pages on your site. The homepage is typically 1.0, category pages 0.8, and individual content pages 0.6–0.7. This does not affect ranking directly.
🎓 Best Practices
- Keep sitemap updated - Regenerate after content changes
- Set accurate changefreq - Don't claim pages change more often than they do
- Use meaningful priorities - Homepage > Categories > Products > Blog posts
- Include all important pages - Don't exclude pages you want indexed
- Exclude utility pages - Skip login, checkout, 404 pages
- Submit after major updates - Notify search engines proactively
More information about the module's user interface https://doc.oneentry.cloud/docs/category/sitemap
Definition of the Sitemap module
const { Sitemap } = defineOneEntry( "your-project-url", { "token": "your-app-token" });
🔗 Related Documentation
- Pages Module - Manage the pages included in the sitemap
- System Module - System-level API utilities