{"id":1121,"date":"2014-08-29T14:48:39","date_gmt":"2014-08-29T18:48:39","guid":{"rendered":"http:\/\/wehuberconsultingllc.com\/wordpress\/?p=1121"},"modified":"2014-08-29T15:04:21","modified_gmt":"2014-08-29T19:04:21","slug":"fixing-wordpress-seo-sitemap-problems","status":"publish","type":"post","link":"https:\/\/wehuberconsultingllc.com\/wordpress\/2014\/08\/29\/fixing-wordpress-seo-sitemap-problems\/","title":{"rendered":"Fixing WordPress SEO Sitemap Problems"},"content":{"rendered":"<p>I decided to switch over to WordPress SEO(Yoast) yesterday and ran into a slew of problems with their sitemap generator, a 404 error, a blank screen, and a sitemap.xml not being properly re-directed to the new sitemap_index.xml. The first problem led me to this Yoast knowledge base article, <a href=\"http:\/\/kb.yoast.com\/article\/16-my-sitemap-is-giving-a-404-error-what-should-i-do\">My sitemap is giving a 404 error, what should I do?<\/a> I fixed the first problem by adding the code to my .htaccess file. To fix the last two problems I added the RewriteRules for the xsl statement(Line 8) and the sitemap.xml(Line 5). Now both sitemap.xml and sitemap_index.xml are being properly redirected and formatted. My Google Webmaster Tools is happy!<\/p>\n<p><strong>Note:<\/strong> The code below is for a WordPress blog in a sub-directory called wordpress.<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n# WordPress SEO - XML Sitemap Rewrite Fix\r\nRewriteEngine On\r\nRewriteBase \/wordpress\/\r\nRewriteRule ^sitemap_index.xml$ \/wordpress\/index.php?sitemap=1 &#x5B;L]\r\nRewriteRule ^sitemap.xml$ \/wordpress\/index.php?sitemap=1 &#x5B;L]\r\nRewriteRule ^(&#x5B;^\/]+?)-sitemap(&#x5B;0-9]+)?.xml$ \/wordpress\/index.php?sitemap=$1&amp;sitemap_n=$2 &#x5B;L]\r\n# This rewrite ensures that the styles are available for styling the generated sitemap.\r\nRewriteRule ^\/(&#x5B;a-z]+)?-?sitemap\\.xsl$ \/wordpress\/index.php?xsl=$1 last;\r\n# END WordPress SEO - XML Sitemap Rewrite Fix\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I decided to switch over to WordPress SEO(Yoast) yesterday and ran into a slew of problems with their sitemap generator, a 404 error, a blank screen, and a sitemap.xml not being properly re-directed to the new sitemap_index.xml. The first problem led me to this Yoast knowledge base article, My sitemap is giving a 404 error, &hellip; <a href=\"https:\/\/wehuberconsultingllc.com\/wordpress\/2014\/08\/29\/fixing-wordpress-seo-sitemap-problems\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Fixing WordPress SEO Sitemap Problems&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,3],"tags":[130,123],"class_list":["post-1121","post","type-post","status-publish","format-standard","hentry","category-linux","category-wordpress","tag-linux","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4iN3d-i5","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/1121","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/comments?post=1121"}],"version-history":[{"count":5,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/1121\/revisions"}],"predecessor-version":[{"id":1126,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/1121\/revisions\/1126"}],"wp:attachment":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/media?parent=1121"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/categories?post=1121"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/tags?post=1121"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}