Skip to main content

Overview

When using Supabase Edge Functions for dynamic sitemaps or APIs, your URLs look like:
https://abcdefghijk.supabase.co/functions/v1/sitemap
This guide shows you how to proxy these URLs through your own domain using Hado SEO’s routing rules:
https://yourdomain.com/sitemap.xml

Why Proxy Supabase URLs?

  • Flatten sitemap nesting: Google only follows one level of nesting in sitemap indexes. If your static sitemap.xml points to a <sitemapindex> on Supabase which contains sub-sitemaps, Google won’t discover them. Proxying /sitemap.xml directly to your Edge Function flattens this to one level
  • Better SEO: Search engines prefer sitemaps served from your own domain
  • Professional branding: No third-party URLs visible to users
  • Flexibility: Change backends without updating references
  • Trust signals: Links stay on your domain

Set Up with Hado SEO Routing Rules

Hado SEO’s routing rules let you proxy paths on your domain to your Supabase Edge Functions with no code changes.
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:
FieldValue
Rule TypeProxy
Source Path/sitemap.xml
Target URLhttps://YOUR_PROJECT_REF.supabase.co/functions/v1/sitemap
Replace YOUR_PROJECT_REF with your Supabase project reference.
3

Add More Rules (Optional)

If you have additional Supabase endpoints, add proxy rules for each:
Source PathTarget URL
/sitemap.xmlhttps://YOUR_PROJECT_REF.supabase.co/functions/v1/sitemap
/api/posts/*https://YOUR_PROJECT_REF.supabase.co/functions/v1/posts
4

Save and Test

Click Save. Visit https://yourdomain.com/sitemap.xml to verify your sitemap loads correctly.

Bulk Import via CSV

If you have many endpoints to proxy, use CSV import:
source,destination,type,status_code,notes
/sitemap.xml,https://YOUR_PROJECT_REF.supabase.co/functions/v1/sitemap,proxy,,Dynamic sitemap
/api/posts/*,https://YOUR_PROJECT_REF.supabase.co/functions/v1/posts,proxy,,Blog posts API
See the Routing Rules documentation for more details on CSV import.

Update robots.txt

Make sure your robots.txt references the proxied sitemap:
User-agent: *
Allow: /

Sitemap: https://yourdomain.com/sitemap.xml
You can set this directly from your Hado SEO dashboard under Domain Settings > Custom robots.txt (Base44 only).

Testing Your Setup

1. Direct Access Test

curl -I https://yourdomain.com/sitemap.xml
Should return 200 OK with Content-Type: application/xml or Content-Type: text/xml.

2. Content Verification

curl https://yourdomain.com/sitemap.xml
Should return your sitemap XML with URLs using your custom domain.

3. Google Search Console

Submit the sitemap in Search Console and verify no errors.

Troubleshooting

The proxy can’t reach Supabase.Check:
  • Supabase function URL is correct
  • Function is deployed and working
  • No typos in project reference
Proxy returns empty content.Check:
  • Supabase function returns data when called directly
  • The source path in your routing rule matches the URL you’re visiting
Response has incorrect Content-Type header.Check:
  • Your Supabase function sets the correct Content-Type header (e.g., application/xml for sitemaps)

Next Steps