Overview
Static sitemaps work for simple sites, but if your app has dynamic content (blog posts, products, user profiles), you need a sitemap that updates automatically. This guide shows you how to create a dynamic sitemap using Base44 backend functions — no manual coding required. Just paste one of the prompts below into Base44 and customize the placeholders.When You Need a Dynamic Sitemap
- Blog or content site with new posts
- E-commerce with product pages
- Directory or listing site
- Any app where pages are created from database records
Prerequisites
- A Base44 project
Step 1: Choose the Right Prompt
Pick the prompt that best matches your site, then customize the placeholders (marked with[BRACKETS]) before pasting it into Base44.
Static-Only Sitemap (no database content)
Static-Only Sitemap (no database content)
Use this if your site has no database-driven pages — just fixed routes like
/about, /pricing, etc.Hybrid Sitemap (static pages + some dynamic content)
Hybrid Sitemap (static pages + some dynamic content)
Use this if your site has static pages and some dynamic content from your database (under 1,000 items per entity).
Backend Function Sitemap (large datasets)
Backend Function Sitemap (large datasets)
Use this if you have 1,000+ records across your entity types (up to 50,000 total URLs).
Paginated Sitemap (over 50,000 URLs)
Paginated Sitemap (over 50,000 URLs)
Use this if your total URL count exceeds 50,000 and you need paginated sub-sitemaps.
Step 2: Verify the Backend Function
After Base44 generates and deploys the code, verify the backend function is returning valid XML. Your sitemap function will be available at:Step 3: Create Custom Sitemap in Hado SEO
Base44 does not allow customizingsitemap.xml or robots.txt directly. Instead, configure a custom sitemap in your Hado SEO dashboard:
- Go to your Domain Settings in the Hado SEO dashboard
- Add a custom
sitemap.xmlusing a<sitemapindex>that references your Base44 backend function: - Click Sync Sitemap in your dashboard to get your pages listed in the pages table
Step 4 (Optional): Proxy the Sitemap Through Your Domain
Search engines prefer sitemaps served from your own domain. Use Hado SEO’s routing rules to proxy/sitemap.xml to your Base44 backend function — no code changes needed.
Open Routing Rules
In your Hado SEO Dashboard, select your domain and go to the Routing Rules tab.
Add a proxy rule
Click Add Rule and configure:
| Field | Value |
|---|---|
| Rule Type | Proxy |
| Source Path | /sitemap.xml |
| Target URL | https://[PROJECT].base44.app/functions/sitemap |
| Priority | 10 |
Routing rules are processed by Hado SEO’s proxy before your app is hit. The request is forwarded to your Base44 function and the response is returned under your domain — visitors and search engines see
yourdomain.com/sitemap.xml. Learn more in the Routing Rules documentation.Step 5: Test Your Sitemap
Browser Test
Visit your sitemap URL. You should see properly formatted XML.Google Search Console
- Go to Google Search Console
- Navigate to Sitemaps
- Submit your sitemap URL
- Check for any errors
Sitemap Best Practices
Keep sitemaps under 50,000 URLs
Keep sitemaps under 50,000 URLs
Google limits sitemaps to 50,000 URLs or 50MB. For larger sites, use the Paginated Sitemap prompt above.
Update lastmod accurately
Update lastmod accurately
Only update
lastmod when content actually changes. Google may ignore sitemaps that update lastmod without real changes.Include only indexable pages
Include only indexable pages
Don’t include:
- Pages blocked by robots.txt
- Pages with
noindexmeta tag - Redirect URLs
- Login-required pages
Use proper URL encoding
Use proper URL encoding
Encode special characters in URLs:
&becomes&<becomes<>becomes>"becomes"'becomes'