Title: XML Sitemap Format Error
Last modified: May 16, 2022

---

# XML Sitemap Format Error

 *  Resolved [TitoZ](https://wordpress.org/support/users/titoz/)
 * (@titoz)
 * [4 years ago](https://wordpress.org/support/topic/xml-sitemap-format-error/)
 * Greetings, our page-sitemap.xml file is producing a format error. If you look
   at the sitemap here:
 * [https://americanregen.com/page-sitemap.xml](https://americanregen.com/page-sitemap.xml)
 * Yuu can see that the second line does not have a properly formatted URL. Instead
   it shows a pound sign (#). This may be from a null link in the navigation.
 * How can we prevent this from showing in the XML sitemap?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fxml-sitemap-format-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Jeroen Rotty](https://wordpress.org/support/users/jeroenrotty/)
 * (@jeroenrotty)
 * [4 years ago](https://wordpress.org/support/topic/xml-sitemap-format-error/#post-15652080)
 * Hey [@titoz](https://wordpress.org/support/users/titoz/),
 * Thank you for reaching out.
 * I can see the “#” line as well. I think this is due to a canonical URL on a page
   that is set to #, instead of a valid URL.
 * If you sort your pages on the column Date and open up the oldest page (last modified
   in 2015), check the Yoast SEO metabox, and open up the advanced tab, what is 
   the canonical URL in there? If you see a #, remove that and see if it updates
   the sitemap.
 * If helpful, more information on canonicals can be found here: [https://yoast.com/help/canonical-urls-in-yoast-seo/](https://yoast.com/help/canonical-urls-in-yoast-seo/)
 *  Thread Starter [TitoZ](https://wordpress.org/support/users/titoz/)
 * (@titoz)
 * [4 years ago](https://wordpress.org/support/topic/xml-sitemap-format-error/#post-15654037)
 * Hi Jeroen,
 * Thanks for your prompt reply and for the suggestions. I looked at the pages in
   that date range and found that someone had used the “Page Links To” plugin to
   redirect a page to “#”. This is why the pound mark was showing up in the XML 
   sitemap.
 * I set the plugin to use the page’s normal URL and saved the page as a draft, 
   as the intent was to make it inaccessible to the public.
 * Thanks again!
 *  Thread Starter [TitoZ](https://wordpress.org/support/users/titoz/)
 * (@titoz)
 * [4 years ago](https://wordpress.org/support/topic/xml-sitemap-format-error/#post-15654045)
 * I am making this issue as resolved now.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘XML Sitemap Format Error’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [TitoZ](https://wordpress.org/support/users/titoz/)
 * Last activity: [4 years ago](https://wordpress.org/support/topic/xml-sitemap-format-error/#post-15654045)
 * Status: resolved