Skip to main content

Hello :)

 

I am trying to create an xml sitemap for our website which is built with CloudPages. I have created a new XML Code Resource and added something like the code below with actual URLs. However when trying to access the page it gives me an error:

"This page contains the following errors: error on line 2 at column 6: XML declaration allowed only at the start of the document", which I believe is due to the added spaces in the first and last row (I double-check my code, and have no spaces, certainly not at the beginning, so I have a hunch that it's somehow automatically added). Does anyone have any ideas how to fix this? Did someone successfully set up an XML sitemap in Cloud Pages (and submitted it to Google Search Console/Google Webmaster Tools)?

 

Thank you!

 

<?xml version="1.0" encoding="UTF-8"?>

<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>

<loc>https://mywebsite.com/placeholderURLlink</loc>

<lastmod>2019-11-20</lastmod>

<priority>1</priority>

</url>

</urlset>

11 comentarios
0/9000