Quantcast
Channel: Harry's TechBlog » wordpress
Viewing all articles
Browse latest Browse all 3

Broken WordPress Sitemaps

$
0
0

After adding the WordPress SEO by Yoast plugin to my blog I noticed that neither the new nor old sitemap contained correct information so I ended up with broken WordPress sitemaps.

The involved plugins in this case were

  1. WordPress SEO by Yoast
  2. XML Sitemaps
  3. Contact Form 7
  4. WordPress Theme Customizr

With both sitemap plugins active, various weird things happened.

Contact Form 7 URIs in the Sitemap

I added a contact form to my blog and got this URI in the sitemaps:

<loc>http://harry.subnetworx.de/?post_type=wpcf7_contact_form&p=434</loc>

This URI led to two errors. First it rendered the XML invalid since the & character did not get encoded into &amp; and second the URI could not render and ended up in a 404 not found error.

Customizr Menu Items in the Sitemap

I added a Customizr menu item to display the “About me” menu in the blog headline. This menu entry showed up as a separate post URI in the sitemap like this

<loc>http://harry.subnetworx.de/2013/12/30/about-me/</loc>

At least this item was valid XML but nevertheless it showed up with a 404 not found error as well.

Pages in the Sitemap Which Should Not be Indexed

In Yoast’s sitemap it is possible to exclude certain pages from the sitemap. This setting was completely ignored and all posts and pages showed up in the sitemap, regardless of any configuration setting.

Fix for the Broken WordPress Sitemaps

After posting to all plugin support forums and discussing the problems back and forth, I got the tip that it all was the result of two (or probably more) active sitemap plugins. Somehow those plugins seem to interfere and mess everything up.

After disabling the XML Sitemap plugin, all problems vanished at once. The sitemaps contained valid XML, all strange objects (forms and menu items) vanished and all excluded pages did not show up on the sitemap anymore.


Viewing all articles
Browse latest Browse all 3

Trending Articles