Sitemap.xml is not domain-specific (so Google errors on it)

I’ve just published a new website which is bound to two domain names SYGNAL.COM and SYGNAL.TECH.
I have Sitemap auto-gen turned on, and I’m currently registering the site through Google Search Console (aka Google Webmaster) and adding the sitemaps.

Google is giving me an error on the Sitemap because the in-sitemap hostnames don’t match the requesting hostname. If you look at the Sitemap on SYGNAL.COM

http://sygnal.com/sitemap.xml
You can see that it references SYGNAL.TECH rather than SYGNAL.COM.

How do I fix this so Google will accept my Sitemap.xml?

check your google site verification for sygnal.com

Your note indicates the code is for sygnal.tech…

In checking sygnal.tech… it’s the same google site verification.

I notice you are also using the same GA ID for both sites.

Personally, I wouldn’t create 1 site and host it on 2 domains.

I definitely recommend setting a default domain( Step 3: Connect a custom domain | Webflow University) as with search engines you’ll need to set a preferred domain (https://support.google.com/webmasters/answer/44231?hl=en) as well when registering your domain for what shows up in search results.

When you have multiple custom domains you can potentially hurt your domain authority with each additional custom domain each time you add an extra one (goes for additional subdomains too other than your www subdomain). Here’s a good resource to read through to check if it’s the best route for your team: https://moz.com/blog/ranking-multiple-domains-to-own-more-serp-real-estate-whiteboard-friday

Hope that this helps! :bowing_man:

If you look in the HEAD, you can see both verifications. I entered one verification in the WebFlow SEO tab, and the second one I had to input as custom HEAD code. While that’s not the most convenient way, both domains verify fine.

The sitemaps problem is separate from that. Google requires that the links in a sitemap match the domain name the sitemap was accessed through. In our previous CMS, this happens automatically, so with 40 domains, each one sitemaps correctly for Google.

Hi Waldo, the first link you gave is giving me an error; and the second refers to the www v naked domain preference configuration within the Search console. This only affects listing preferences, and is a preference we set. That’s different however from using multiple domain names.

There are a few valid reasons we do that- shorter names for QR codes, product-specific names, market name variations, and corporate brand purchases being among them.

The key questions I have are…

  1. Can Webflow generate the sitemap.xml properly when multiple domain names are registered on the site?
  2. If not, can we at least identify which domain name Webflow uses in generating the sitemap.xml, so that it reflects at least the primary website that will be used in the Google Search Console? Because if this is the case, we can only register one of those domains in the GSC.

The “best practices” I’m heading towards as much as possible is…

Register only one domain for each site in Search Console
Register only one domain for each site inside of WebFlow
For additional domains, simply redirect them at the DNS

In a few cases, this isn’t feasible though, for example when Company A purchases Company B, they now share the same site but still need separate domain names.

yes. I understand that.
perhaps we are speaking apples and oranges.

We have the same issue with a slightly different use case: we use a staging.* URL for publishing changes for client review, prior to publishing to the www.* - So while our site has two URLs, only one is intended to be public facing. When we publish the site to both staging and www, the www site often has staging.* URLs in the sitemap (this behavior doesn’t appear to be consistent either).

My vote would be for the sitemap.xml file to always reflect whichever domain the site is published to, because as @memetican pointed out, I’m not sure the alternative (having a sitemap on Domain A with URLs to Domain B) is even valid according to the protocol without some additional setup.

If nothing else, maybe some explicit rules/explanation about how it behavesr would help. For instance, when publishing to multiple custom domains like this, how is the determination made for which URL is used in the sitemap?

My best guess at this point is that the sitemap is generated as a static file, and in the publishing process, each custom domain’s sitemap.xml overrides the prior one, such that the last one published “wins” over all of the custom domains.

I don’t think you can easily control the publishing order of the custom domains, however you might try deleting and re-adding your primary public domain from the custom domains list so it’s at the bottom?

Or if you don’t mind the extra steps, a band-aid fix could be to publish-to all of your custom domains, and then re-publish only the public-facing one so that it’s the winner on the sitemap.xml reference.

I’ve deleted my custom domains and done DNS redirection instead, so I can’t test this- but I’m keen to know what happens if you give it a try.

Thanks Mike - yeah, I had the same thought. Tried several variations on that approach to no avail - it always seems to revert to this quirky behavior. I opened a new ticket in Bugs with some additional details.

Cheers!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.