First - Webflow is incredible. Amazing work and kudos to the entire team.
So I’ve come across two problems with how Webflow generates sitemaps when there are multiple custom domains (without setting the primary domain):
First, we publish sites to a staging.* URL for client reviews/approvals, then to www for production. However, custom domains appear to be sorted alphabetically, and the one highest in the list appears to be used in the sitemap.xml file. So our sitemap.xml on www.* is full of staging.* URLs.
According to the spec, this doesn’t seem to be valid without some additional setup (which Webflow doesn’t do, and really doesn’t seem necessary). I’d suggest that the sitemap.xml file use the published host URL when generated, as this seems a more expected behavior. Alternatively, maybe some sort of configuration options so you can specify which custom domain should be used for the sitemap - but again, this seems like an edge case considering best-practices. I realize the SEO implications of duplicate content, but the sitemaps as Webflow handles it now won’t fix that issue, and users who truly are publishing identical public content to two separate URLs - well, can we really help them?
Second, due to the issue above, I deleted the staging custom domain and republished the www (to correct the sitemap.xml issue), however the sitemap.xml file was not updated (still contained staging URLs). It was only after I made some material change to content/design and republished that the sitemap was correctly regenerated. This issue would also be resolved by addressing the one above though!
Thanks again for the great platform!