[Plugin: WordPress SEO by Yoast] XML Sitemap missing (41 posts)

  1. jkohlbach
    Posted 3 years ago #

    Oh, and also, using this method if you find that your plugin still breaks the XML sitemap functionality it's because Yoast is flushing the rewrite rules on saving the settings page for XML sitemaps.

    The solution is just to go back into that settings page for XML sitemaps and press save again.

  2. excentricus
    Posted 3 years ago #

    I've just had the same problem as everyone else, with a 404 page appearing in place of the XML file. I found the solution to my problem was to remove the blank line(s) at the end of my funictions.php, so that there's nothing after <?php } ?> or whatever is your last line in your file.

    What happens is that the XML file to be considered valid, it always needs to start on the first line in the source code. When you have a blank line at the end in your file (such as functions.php), your site code will start on the second or third line, which is not a problem for rendering normal pages, but causes XML errors.

    To quickly check whether this is your particular problem, go to your homepage and look in the source code to see on which line the code starts. If it's any other than 1, you need to find the offending file and fix it as described above.

    Hope that helps.

  3. newsfeedgadget
    Posted 3 years ago #

    One other thing to check....

    The XSL change in version 1.1.3 and above added the following file to the plugin: wordpress-seo/css/xml-sitemap-xsl.php.

    If you've "hardened" your wp-content folder via an .htaccess file to limit file types that browsers can call directly (e.g., to prevent php calls), you'll need to add the above file as an "exception".


    Order Allow,Deny
    Deny from all


    <Files "xml-sitemap-xsl.php">
    Allow from all

    The above has also been added to http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-fix-for-sitemap_indexxml-404-error

  4. roibot
    Posted 3 years ago #

    I have the 404 error, tried the .htaccess fix to no avail.

    Narrowed it down to a specific plugin 'Business Directory Plugin', by deactivating all plugins & re-activating one by one. Note also had to switch off and back on sitemaps each time too.

    I have searched the plugin code and it doesn't flush rewrite rules (that I can see)

    (even tried the blank lines ideas, no avail)

  5. boah123
    Posted 3 years ago #

    I've deactivated the plugin.

    I'm using WordPress on Windows. I receive a 404 error message, also in Webmaster Tools.

  6. ArtGoddess
    Posted 3 years ago #

    In my case, the problem is with WPML plugin. I have contacted directly WPML support.

  7. twanster
    Posted 3 years ago #

    I have a similar problem, a bit perplexing.

    I deactivated my old Google sitemaps plugin and opted to use the sitemaps generator from within Joost's WP SEO plugin.

    When I log into my FTP client, I cannot find the new sitemap page at mysite.com/sitemap_index.xml. It is not listed in my FTP client's files.

    I had deleted my sitemaps from the old Google sitemaps plugin, so my FTP client now shows ZERO sitemaps files.

    However, if I type the URL directly into my browser, it shows that the page is there.

    If the page is indeed actually there, how come it is not listed on my FTP client, which shows all files stored on my serever?

    Please advise.

  8. ELAN42.com
    Posted 3 years ago #

    The solution in the first post seems to work.
    I want to add an important fix, to use all this goodies with "Virtual Multiblog" from NerdaPhernalia.

    With that you have multiple WP installations in only 1 folder, so you cant have more than 1 WWWroot/robots.txt and robots.txt have to have the URL of the website where you link sitemap.xml, like this:
    Sitemap: http://www.elan42.com/sitemap_index.xml

    So the solution to this is in 3 steps:
    1- rename robots.txt in robots.php
    2- put inside the robots.php file this code:

    <?php header("Content-Type: text/plain" ); ?>
    User-Agent: *
    Disallow: /wp-content/plugins/
    Sitemap: http://<?php print_r($_SERVER["HTTP_HOST"]); ?>/sitemap_index.xml

    3-teach apache (in .htaccess file) to load robots.php when asked for robots.txt with this code:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L]
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^robots.txt /robots.php [L]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
  9. Michael Cannon
    Posted 3 years ago #

    In using WordPress SEO with W3 Total Cache minify, my sitemap_index.xml files lost their links.

    The fix is adding sitemap(_index|[0-9]+)?\.xml(\.gz)? to "Never minify the following pages" box of the W3TC > Minify options screen.

  10. Joost de Valk
    Posted 3 years ago #

    Too many different issues in one thread. If you still have an issue for your site, please open a new thread with your specifics.

  11. ELAN42.com
    Posted 3 years ago #

    It's ok Joost, just look at my fix it allowed me to use your plugin in a apache directory with > 50 websites installed.

Topic Closed

This topic has been closed to new replies.

About this Topic