Skip to main content

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)

Use this if your site has no database-driven pages — just fixed routes like /about, /pricing, etc.
Use this if your site has static pages and some dynamic content from your database (under 1,000 items per entity).
Use this if you have 1,000+ records across your entity types (up to 50,000 total URLs).
Use this if your total URL count exceeds 50,000 and you need paginated sub-sitemaps.
Google only follows one level of nesting in sitemap indexes. Since your static sitemap.xml is a <sitemapindex> pointing to another <sitemapindex> (the backend function), Google won’t discover the paginated sub-sitemaps. You must proxy /sitemap.xml to your sitemap backend function using Hado SEO’s routing rules (see Step 4 below) so that Google sees the paginated sub-sitemaps directly.
Replace all [BRACKETS] with your actual values before pasting into Base44. For example, replace [YOUR_DOMAIN] with https://myapp.com and list your real pages and entity types.

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 customizing sitemap.xml or robots.txt directly. Instead, configure a custom sitemap in your Hado SEO dashboard:
  1. Go to your Domain Settings in the Hado SEO dashboard
  2. Add a custom sitemap.xml using a <sitemapindex> that references your Base44 backend function:
  3. 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.
1

Open Routing Rules

In your Hado SEO Dashboard, select your domain and go to the Routing Rules tab.
2

Add a proxy rule

Click Add Rule and configure:
3

Verify

Visit https://yourdomain.com/sitemap.xml in your browser. You should see the XML output from your Base44 function, served from your own domain.
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

  1. Go to Google Search Console
  2. Navigate to Sitemaps
  3. Submit your sitemap URL
  4. Check for any errors

Sitemap Best Practices

Google limits sitemaps to 50,000 URLs or 50MB. For larger sites, use the Paginated Sitemap prompt above.
Only update lastmod when content actually changes. Google may ignore sitemaps that update lastmod without real changes.
Don’t include:
  • Pages blocked by robots.txt
  • Pages with noindex meta tag
  • Redirect URLs
  • Login-required pages
Encode special characters in URLs:
  • & becomes &amp;
  • < becomes &lt;
  • > becomes &gt;
  • " becomes &quot;
  • ' becomes &apos;

Next Steps

SEO Optimization

Complete SEO checklist for your app