Building a Sitemap for the first time


(Niro Rajapakse) #1

Hi everyone,

We recently set up a digital marketing team in the organisation and we’re starting to catch up on best practices.
Our website (has a few thousand pages) - has never had a sitemap submitted into the Google Search Console.

We’ve now created a sitemap asset under the home page asset. web path being ourdoman.com.au/sitemap.xml

But when the URL is submitted to the Search Console, the following error comes up:

Unsupported file format. - Your Sitemap does not appear to be in a supported format. Please ensure it meets our Sitemap guidelines and resubmit.

I haven’t been able to pin point what’s wrong. Has anyone had a similar experience?

Thanks!


(Niro Rajapakse) #2


(Niro Rajapakse) #3


(Tim Trodd) #4

Hi,

Have you made sure that asset has public read permissions? If you view it with .xml on the end in a private browser can you view it all correctly?

We use an asset listing to create our sitemap rather than the sitemap asset itself.

Set it to all pages that are live etc. with the root node as the main site asset.

then the page contents we have:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>%globals_site_url%</loc>
    <lastmod>%globals_date_Y%-%globals_date_m%-%globals_date_d%</lastmod>
  </url>
  %asset_listing%
</urlset>

and the type format:

<url>
  <loc>%asset_url%</loc>
  <lastmod>%asset_updated_short%</lastmod>
</url>

This way gives you more freedom in choosing what you want to include in it.

Hope this helps!

Tim


(Bart Banda) #5

What’s the URL to your sitemap? Can you post it here so we can take a look to see what’s wrong?
Maybe it is not getting served as an XML document?


#6

I recently created a sitemap and was getting the same errors. On the asset listing page contents I’d forgotten to remove the < p > tags around %asset_listing% (Google interpreted the page as an HTML page)

Also, make sure the frontend design and paint layout that’s applied to the asset is not interfering. You basically want a blank design.


(Niro Rajapakse) #7

Thanks so much for sharing this Tim.

  • Yes the asset has public read permissions.

  • The code we have was slightly different in Page content and Type Format. I’ve updated to what you have.

Unfortunately still getting the same “unsupported format” error on search console. Site map is here.


(Niro Rajapakse) #8

Hi Bart,

This is the URL

Thanks


(Niro Rajapakse) #9

Hi Edward,

Thanks for sharing… I’ve removed the

tags too now.

Unsure what’s wrong (limited experience with Squiz Matrix. Probably overlooked something very obvious!)


(Niro Rajapakse) #10

Have also tried this version. But again the format issue comes up (S.console recognizes it as a HTML file even though it’s not).


(Tim Trodd) #11

this link appears to be working for me: https://www.oup.com.au/sitemap.xml

Have you selected standard pages as the asset type and the root nodes?


(Niro Rajapakse) #12

Asset type is Standard pages, yes.

My root nodes were empty. So I’ve populated them as below now. But still the same error unfortunately:

Thanks for your direction Tim


(Bart Banda) #13

Looks like you have some non-sitemap-xml tags in there:

Guessing that’s coming from the Paint Layout perhaps?