WPBeginner

Beginner's Guide for WordPress

  • Blog
    • Beginners Guide
    • News
    • Opinion
    • Showcase
    • Themes
    • Tutorials
    • WordPress Plugins
  • Start Here
    • How to Start a Blog
    • Create a Website
    • Start an Online Store
    • Best Website Builder
    • Email Marketing
    • WordPress Hosting
    • Business Name Ideas
  • Deals
    • Bluehost Coupon
    • SiteGround Coupon
    • WP Engine Coupon
    • HostGator Coupon
    • Domain.com Coupon
    • Constant Contact
    • View All Deals »
  • Glossary
  • Videos
  • Products
X
☰
Beginner's Guide for WordPress / Start your WordPress Blog in minutes
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

WPBeginner» Blog» Tutorials» How to Fix Yoast’s WordPress SEO Sitemap 404 Error

How to Fix Yoast’s WordPress SEO Sitemap 404 Error

Last updated on April 13th, 2014 by Editorial Staff
65 Shares
Share
Tweet
Share
Pin
Free WordPress Video Tutorials on YouTube by WPBeginner
How to Fix Yoast’s WordPress SEO Sitemap 404 Error

Are you getting a 404 error when trying to view your sitemap? If you’re using Yoast SEO, this can happen. In this article, we’ll show you how to easily fix Yoast’s SEO sitemap 404 error.

Yoast SEO is one of the most popular SEO plugins for WordPress, but sometimes it can conflict with other plugins or themes on your site.

One of our previous clients ran into the issue of getting a 404 error for their sitemaps generated by Yoast’s WordPress SEO plugin. After trying a few things, we were able to figure out the solution.

First thing you should try is open your .htaccess file. You can use a plugin like Htaccess File Editor to edit your htaccess file from your WordPress dashboard.

We recommend creating a backup of your WordPress site before making any changes, as even a small typo could bring down your website.

Once you’ve installed the plugin, go to Settings » WP Htaccess Editor. Make sure to read the instructions before you click the “I understand. Enable the editor” button.

enable the htaccess editor

After you enable the editor, simply add the following code in there, at the bottom:

# WordPress SEO - XML Sitemap Rewrite Fix
<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>
# END WordPress SEO - XML Sitemap Rewrite Fix

For most people this fixed the issue. Someone reported that while this code fixed the issue, the page was still sending the 404 response header which meant that Google Webmasters tool couldn’t find it.

If that doesn’t fix the 404 sitemap issue, you may need to try another method. While not preferred, in our client’s case we had no choice but to edit the core plugin files to fix the issue. As suggested by hadjedj.vincent, we edited the class-sitemaps.php located in “/wp-content/plugins/wordpress-seo/inc/class-sitemaps.php”.

You need to look at the function init() code and make that section look like this:

/**
	 * Initialize sitemaps. Add sitemap rewrite rules and query var
	 */
	function init() {
		global $wp_rewrite;
		$GLOBALS['wp']->add_query_var( 'sitemap' );
		$GLOBALS['wp']->add_query_var( 'sitemap_n' );
		add_rewrite_rule( 'sitemap_index.xml$', 'index.php?sitemap=1', 'top' );
		add_rewrite_rule( '([^/]+?)-sitemap([0-9]+)?.xml$', 'index.php?sitemap=$matches[1]&sitemap_n=$matches[2]', 'top' );
		$wp_rewrite->flush_rules();
	}

Basically what we are doing is adding the global $wp_rewrite; before everything that is already there and adding flush_rules after the code. By adding this in the plugin, it fixed the sitemap 404 issue on our client’s website.

Some of our users reported that after applying the above fix, they still needed to uncheck the sitemap option in the Yoast’s SEO plugin and save their settings. After that re-checking the sitemap’s option fixed the error for them.

If you were looking for a fix for your sitemap 404 issue, we hope that this fix has helped you! You might also want to check out our comparison of Yoast SEO vs. AIOSEO.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

65 Shares
Share
Tweet
Share
Pin
Popular on WPBeginner Right Now!
  • Google Analytics in WordPress

    How to Install Google Analytics in WordPress for Beginners

  • How to Properly Move Your Blog from WordPress.com to WordPress.org

  • Checklist

    Checklist: 15 Things You MUST DO Before Changing WordPress Themes

  • How to Fix the Error Establishing a Database Connection in WordPress

    How to Fix the Error Establishing a Database Connection in WordPress

About the Editorial Staff

Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi. Trusted by over 1.3 million readers worldwide.

The Ultimate WordPress Toolkit

239 Comments

Leave a Reply
  1. D Moran says:
    Feb 20, 2014 at 11:28 am

    I just bought the Genesis Framework theme and then installed the yoast seo plugin and activated. I then tried to generate my sitmap and get this same 404 error.

    “Not found, error 404
    The page you are looking for no longer exists. Perhaps you can return back to the site’s homepage and see if you can find what you are looking for. Or, you can try finding it by using the search form below.”

    Does this mean that the theme I got from Genesis is badly coded? Did I waste my money??

    Reply
    • WPBeginner Support says:
      Feb 20, 2014 at 2:23 pm

      It is highly unlikely, Genesis Child Themes purchased from StudioPress are very well coded. Try deactivating all your plugin to find out if a plugin is causing this issue.

      Reply
      • Chris Sparks says:
        Feb 28, 2014 at 11:06 am

        I had a similar issue after installing Yoast SEO. I deactivated the plugin, then restarted and the URL system picked up and started working as expected. This seems to be related to how the permalink structure is set up as only one of our sites has experienced this issue.

        Thanks for posting!

        Reply
  2. Kase Dean says:
    Feb 3, 2014 at 11:55 am

    I don’t know what just happened.

    But that fixed it!

    Thank you :-)

    Reply
  3. john says:
    Jan 14, 2014 at 1:41 pm

    hello I tried fixing the 404 error code and now I get the following messege:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    and after that i remove the folder of plugin seo and nothing is working again what can i do???

    Reply
    • WPBeginner Support says:
      Jan 15, 2014 at 9:46 am

      Do you see an error? Can you access WordPress admin area?

      Reply
  4. Eoin Healy says:
    Jan 7, 2014 at 3:50 pm

    Another easy way to fix the sitemaps is to simply disable sitemap functionality and enable it again…. works for me every time, doesn’t matter what plugins i have installed.

    In Admin, to go SEO > XML SItemaps
    Under ‘XML Sitemap’ uncheck ‘Check this box to enable XML sitemap functionality.’, hit save, check the box again and hit save.

    Reply
    • Brent G says:
      Jan 11, 2014 at 11:19 am

      Eoin, Thanks for the great solution!!!!

      Reply
    • George says:
      Jan 19, 2014 at 4:04 pm

      This worked for me as well. Thanks!

      Reply
    • Fred Higson says:
      Feb 5, 2014 at 11:51 am

      This worked for me too! Cheers Eoin!

      Reply
    • Jeremy Hogan says:
      Feb 11, 2014 at 3:56 pm

      So simple and yet so effective. This was the answer for me as well. Thanks!

      Reply
    • Tyler says:
      Feb 19, 2014 at 11:52 pm

      Great solution, Eoin! Thanks so much for letting us know!

      Reply
  5. Margot Barrios says:
    Nov 14, 2013 at 6:09 pm

    I already fixed using the first option, how would I know if it’s working already? Should I need to wait for Google’s webmaster report? This is where I saw the 404 error on my site.

    Reply
    • WPBeginner Support says:
      Nov 14, 2013 at 10:59 pm

      yes you should be able to see your sitemap file in Webmaster Tools

      Reply
  6. Eric Kuhn says:
    Nov 11, 2013 at 9:56 pm

    I replaced the edit files with the XML sitemap fix and completely removed what was there initially. Google webmaster tools has accepted the sitemap however, my sitemap doesn’t show a 404 or anything. Does that mean everything is ok?

    Reply
    • WPBeginner Support says:
      Nov 12, 2013 at 9:34 pm

      Yes, everything looks OK.

      Reply
  7. Melissa says:
    Oct 17, 2013 at 3:18 pm

    I tried fixing the 404 error code and now I get the following messege:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    Please contact the server administrator, and inform them of the time the error occurred, and anything you might have done that may have caused the error.

    More information about this error may be available in the server error log.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

    Apache/2.2.23 (Unix) mod_ssl/2.2.23 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 Server at artattackfx.com Port 80

    I cannot access the WP Admin Site… How can I revert to before I added this code :

    # WordPress SEO – XML Sitemap Rewrite Fix
    2

    3
    RewriteEngine On
    4
    RewriteBase /
    5
    RewriteRule ^sitemap_index\.xml$ /index.php?sitemap=1 [L]
    6
    RewriteRule ^([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 [L]
    7

    8
    # END WordPress SEO – XML Sitemap Rewrite Fix

    to the htacess code in YOAST? Please Help.

    Reply
    • WPBeginner Support says:
      Oct 21, 2013 at 7:10 pm

      As the tutorial suggests you added the code in .htaccess file on your webserver? If yes, then simply edit the .htaccess file and remove the code you added.

      Reply
      • Remi says:
        Nov 4, 2013 at 6:42 pm

        I thought I followed to the letter your second suggestion but have the same issue as Melissa. Now waiting for the Webhost for a solution. What about adding a warning in your second solution that it can lead to a 500 Internal Server Error.

        Reply
        • WPBeginner Support says:
          Nov 4, 2013 at 8:37 pm

          You can also revery back by editing the file your modified through FTP. Connect to your website using an FTP client. Locate the file you modified (.htaccess or class-sitemaps.php) and remove the code you added. Alternately, you can also delete the WordPress SEO folder from your wp-content/plugins/ directory through FTP.

  8. Todd says:
    Oct 6, 2013 at 10:35 am

    Thanks a lot. The first fix worked for me as well.

    Reply
  9. icejava says:
    Aug 31, 2013 at 9:24 am

    Thanks, I had to apply both fixes to get mine too work! Job well done.

    Reply
  10. Andy says:
    Aug 10, 2013 at 1:31 pm

    Thank you very much for this. Works perfectly!

    Reply
  11. Toni says:
    Aug 8, 2013 at 1:20 am

    Can anyone advise on how to delete the post-sitemap.xml as I cannot find it in my root directory! I have turned of the generate sitemap in Yoast.

    Reply
  12. Koen says:
    Aug 6, 2013 at 4:38 pm

    Hi,
    I have wordpress 3.6 with Avada theme and WordPress SEO by Yoast plugin.
    First I got the 404 error page.
    Then I applied the .htaccess fix without any result.
    Then I applied the class-sitemaps.php fix, now the sitemap returns a blank page.
    What to do?
    Please help. Avada isn’t a crappy theme, I think.
    Cheers, Koen

    Reply
    • Frank says:
      Sep 9, 2013 at 6:21 pm

      Koen,

      I’m having the same problem I was thinking it was a Nginx issue because I’m not hosting on an Apache server.

      are you hosted on a Apache server?

      Reply
    • glowzar says:
      Jan 22, 2014 at 5:43 pm

      I know more than 1 with avada theme an the same problem.

      Reply
  13. Gbenga Adebayo says:
    Jul 28, 2013 at 7:19 pm

    Hi,

    Appears i still have a few issues to sort out. Google webmaster reporting http 403 errors with my sitemap. I can’t find the sitemap anymore in my root folder. I can navigate to the sitemap using my browser without getting a 404 error message.

    Any suggestions or help is appreciated.

    Reply
  14. Gbenga Adebayo says:
    Jul 27, 2013 at 4:40 pm

    Many thanks! .htaccess addition fixed the error for me

    Reply
  15. Madhu says:
    Jul 19, 2013 at 8:00 pm

    Phew … Thanks again!
    I updated my SEO pluggin and the sitemaps had the same issue.
    I had to incorporate both the fixes.

    Reply
  16. Rajesh Thakur says:
    Jul 9, 2013 at 11:26 am

    Thanks First one did worked for me need to clear w3 cache after that and wait a little also disable XML sitemap checkbox and check it again

    Reply
  17. Erica says:
    Jun 26, 2013 at 1:54 pm

    I tried the second set of instructions and it resulted in a “Fatal Error” message and I was unable to access my WP site, or even the login page. Scary!

    Reply
  18. Nyla says:
    Jun 23, 2013 at 1:28 pm

    Hi all

    I’m an very frustrated to say that I am too getting 404 error, I’m using kriesi replete theme.

    I have tried both options however nither worked

    I’m not sure if I’m doing it write, can somebody explain…. In simple terms are we deleting and replacing the existing code on both options? Or just adding? It’s not clear or does it make a difference if the prexisting remains

    Thanks in advance

    Reply
  19. Jonny R says:
    Jun 23, 2013 at 10:16 am

    Awesome thanks, implementing both worked perfectly!

    Reply
  20. Fin O'Suilleabhain says:
    May 29, 2013 at 4:58 pm

    Worked like a charm. Grateful for the helpful post.

    Reply
  21. Ahmed Alahdal says:
    May 10, 2013 at 4:51 am

    Thanks for the fix :)

    Reply
  22. Joyce says:
    May 8, 2013 at 10:13 am

    Thank you so much!
    this worked — had to make both changes, (edited the class-sitemaps.php file).

    Reply
  23. Anudeep says:
    Mar 25, 2013 at 11:28 pm

    Thanks a lot!
    It worked :)

    Reply
  24. Rohin says:
    Mar 24, 2013 at 2:00 pm

    Damn helpful.
    One of my clients had this problem and just took 5 minutes to solve the issue. Just because of this post.
    Thanks a lot.
    :)

    Reply
  25. Ron MacGregor says:
    Nov 25, 2012 at 7:15 pm

    I am new to WordPress and have only begun a using the Canyon theme. I got the 404 message as I was attempting to install a “contact info” plugin. Does anyone know if I just begin at the very beginning again, i.e. go through my GoDaddy account to reinstall WordPress and then reinstall the Canyon theme – might that solve the 404 problem?

    Reply
    • Editorial Staff says:
      Nov 27, 2012 at 7:49 am

      It is probably the issue with that other plugin.

      Reply
  26. Ricky says:
    Nov 19, 2012 at 5:12 pm

    Thanks for the fix!

    Reply
  27. Jack Logan says:
    Oct 31, 2012 at 8:17 am

    I have two sets of websites (WordPress Multisite installs) and I have no issues with sitemaps on one of them and I get a 404 error with category_sitemap.xml on the other one.

    I tried both fixes suggested in this post, but they don’t solve the issue. The only thing that works is going to Posts -> Categories – Edit and changing from “Auto detect” to “Always include” on all categories.

    The issue here is that I have over 200 sites, and about 8 categories per page, so it would take too long to do it just to get category sitemaps, even though I could use it….

    Is there any way to mass change all the categories on WP Multisite to “Always include”. I think this would be a solution that would work for everyone.

    Thank you.

    Reply
  28. Jacques Karsten says:
    Oct 2, 2012 at 8:42 am

    If none of this works try create a file named sitemap_index.xml on your html root through ftp and make sure the permissions are set and the plugin should then take care of the rest.

    Reply
    • Kevin says:
      Dec 14, 2012 at 1:57 pm

      Thanks!! your suggest worked perfectly!

      Reply
      • John says:
        Dec 28, 2012 at 12:51 pm

        I did both and it started working. It sounds pretty obvious, but make sure if you copy and paste that you take the line numbers out. I forgot to and broke my .htaccess file for a few minutes.

        Reply
  29. Hector Torres says:
    Sep 28, 2012 at 3:42 pm

    Hi, just wanted to give my thanks, used the second option suggested ad it fixed my 404 error. Thanks!

    Reply
  30. Adam says:
    Sep 24, 2012 at 5:49 pm

    I’m not sure which part worked for me, but I found this page because I was getting the 404, too. I disabled the XML Sitemaps in the plugin, then enabled it and checked the boxes to exclude posts (since I only have pages). Now, it is working perfectly.

    Reply
    • Prashant says:
      Apr 6, 2013 at 2:53 pm

      Thanks Mate Perfect ! Suggestion for Me !!!!!!!!!!!!!!!!!! Really Greatful Thanks

      Reply
  31. Ov3rfly says:
    Sep 24, 2012 at 6:41 am

    During research about a similar 404 sitemap xml feed problem, I found a different reason which I would like to share:

    WordPress adds a 404 header to all feeds if no posts exist in a site.

    More details and a hotfix here:
    http://wordpress.org/support/topic/sitemap-xml-feed-is-shown-but-404-header-added-by-wordpress-if-site-has-no-posts

    Reply
  32. Brad Dalton says:
    Sep 23, 2012 at 11:30 am

    I think there are other issues with this plugin as well.

    The attachment pages aren’t all redirecting to the parent page which is something i noticed today.

    Reply
    • Editorial Staff says:
      Sep 23, 2012 at 4:42 pm

      Create a ticket in the support forum. We haven’t tried that feature yet.

      Reply
  33. Michi says:
    Sep 22, 2012 at 11:29 am

    No other comment since April. That has been 5 months since. I have the 404 still in Sept 2012! Was able to fix it with the .htaccess fix. Thanks for posting
    Just wondering why this is STILL an issue.

    Reply
  34. Sandie Wright says:
    Sep 15, 2012 at 7:58 pm

    It worked for me! Open the class-sitemaps.php file located in plugins > wordpress-seo > inc folder. then find the code around line 79 and replace the old code with this new code:
    /**
    * Initialize sitemaps. Add sitemap rewrite rules and query var
    */
    function init() {
    global $wp_rewrite;
    $GLOBALS[‘wp’]->add_query_var( ‘sitemap’ );
    $GLOBALS[‘wp’]->add_query_var( ‘sitemap_n’ );
    add_rewrite_rule( ‘sitemap_index\.xml$’, ‘index.php?sitemap=1’, ‘top’ );
    add_rewrite_rule( ‘([^/]+?)-sitemap([0-9]+)?\.xml$’, ‘index.php?sitemap=$matches[1]&sitemap_n=$matches[2]’, ‘top’ );
    $wp_rewrite->flush_rules();
    }
    Then, go back to your WP admin page and then go to the SEO plugin > XML sitemaps, and then click the button again (XML Sitemap). The 404 should be replaced with your sitemaps! Easy peasy.

    Reply
    • Boah says:
      Sep 16, 2012 at 6:33 am

      @SANDIE WRIGHT: I followed your instructions but it did not solve my 404 problem.

      Reply
  35. raviteja says:
    Aug 15, 2012 at 5:27 am

    thanks you, the rewrite rule itself cured the problem of 404 not available sitemap

    Reply
  36. Jody says:
    Jul 29, 2012 at 9:25 pm

    Thanks for jacking up my site! i tried your code and now i got a 500 internal service error i have been trying for hours to fix! thanks for making my little problem into a HUGE problem!

    Reply
    • Editorial Staff says:
      Jul 30, 2012 at 9:25 am

      If you are getting a 500 internal service error, you can simply undo the changes. Not sure why you would get that.

      Reply
  37. Brad Dalton says:
    Jul 28, 2012 at 10:58 pm

    I’m finding my sitemap gets removed everyday and then indexed again. Here’s what i get every day. http://postimage.org/image/3rb3d8qsr/932c5815/

    I don’t think it’s my theme as i’m using Genesis.

    Not sure but it may be the way my server is configured.

    Reply
    • Editorial Staff says:
      Jul 29, 2012 at 9:22 am

      Has to be a conflict with something else (another plugin or server settings). We are using Genesis on this site as well and do not have that issue.

      Reply
  38. Eva says:
    Jul 17, 2012 at 10:49 am

    Hi!

    Thank you so much for posting this article! With the first fix, I managed to solve the 404 issue for most sitemaps, though there’s still 1 that is showing the error… Any suggestions of what to do?

    I thought about exporting the Yoast SEO settings and reinstalling the plugin to see if that does the trick. Just to be on the safe side: does exporting literally export all settings, even the page/article level SEO customizations OR only the general settings?

    Thanks!

    Eva

    Reply
  39. Sara says:
    Jul 17, 2012 at 6:11 am

    Thanks so much – this worked for me.

    I know you said the plugin is good, and the problem is in the theme or other plugins, but I tried disabling all plugins and switching to the twenty eleven theme, and the sitemap still gave a 404 error. The only thing that worked for me is editing the htaccess file.

    Reply
    • Boah says:
      Jul 17, 2012 at 11:07 am

      … and I tried the same thing. Removed all the plugins, all the themes, and tried it again: 404 error. To make it worse: I’d have an .htaccess file because of IIS. Which options are there for me?

      Reply
      • Boah says:
        Jul 17, 2012 at 11:08 am

        Typo: ‘I’d have an’ must be ‘I don’t have an htaccess file’

        Reply
  40. Rusty Solomon says:
    Jul 12, 2012 at 1:20 pm

    I guess SEO Yoast recent update have sitemap problem as I cant see any sitemap on the URL the plugin provide. Let me know if any one has the same issuee and Fix.

    Also is there any good plugin avaialble as same as SEO Yoast.

    Thanks & Regarsd

    Reply
  41. Jay Wylie says:
    Jul 12, 2012 at 3:22 am

    Hi, I have tried the first fix, but broke my site in the process. Is there anyway to re-edit my htaccess file, to stop it causing a 500 internal server error?

    thanks

    Reply
    • Editorial Staff says:
      Jul 12, 2012 at 7:06 am

      You can simply take the code out. Use FTP <

      Reply
  42. Boah says:
    Jul 4, 2012 at 5:24 am

    Hi!

    I have edited the plugin as suggested but don’t have a .htaccess file. I still do receive a 404 error.

    I’ve also add message on the plugin forum. No replies yet. Suggestions are more than welcome!

    http://wordpress.org/support/topic/plugin-wordpress-seo-by-yoast-404-when-viewing-xml-sitemap-1

    Reply
  43. Colin says:
    Jun 18, 2012 at 12:37 pm

    Hi Joots, I’m using the latest version of the SEO plugin. I’m going over previous posts and completeing the various fields, “Focus Keyword”, “SEO Title”, etyc, etc but after I update the post and then go back to “Edit” those fields are then blank again. I wondered how I could rectify this?

    Thanks,

    Colin
    Liverpool, UK

    Reply
  44. Saki_Kawa says:
    Jun 17, 2012 at 5:49 pm

    The solution doesn’t resolved my issue.. I still have a blank page at post-sitemap.xml
    Does someone have a solution?? Or I need to unistall this plugin and find another one for my sitemap..

    Reply
  45. Adam Parnala says:
    Jun 9, 2012 at 9:08 am

    Hi, I don’t have any problems with yoast seo plug in as I’m currently using it. I just I want to ask if it is better than the all in one seo plug in? I’m just curious because I found out that a lot of blogs in my niche uses it. Which is better? the all in one seo or yoast seo? (I’m already used to yoast). Oh, can I also ask how to set multiple focus keyword in Yoast seo? because there is only one field and I can’t figure out how to set a few more keywords for it. Sorry for my questions I hope you can answer me. Thanks!

    Reply
    • Editorial Staff says:
      Jun 12, 2012 at 12:11 pm

      Yoast’s plugin is a more complete SEO plugin.

      Reply
  46. yoast says:
    May 14, 2012 at 3:00 am

    Anyone here who’s willing to test another (and better) fix with me?

    Reply
    • Craig says:
      Jun 9, 2012 at 11:25 pm

      I’d be willing to test a better fix for this issue but I’m reluctant to commit to a timeframe as I’m not really good at keeping on top of my todo’s since my stroke. (This is one of the reasons I haven’t returned to work as a PHP coder yet.)

      And I’d be *very* interested in helping if I happen to be experiencing any of the issues cited above.

      Craig

      Reply
    • Shawn Poole says:
      Jun 12, 2012 at 11:09 am

      Hi,
      Yoast, if the offer is still good, I would LOVE too! I am not to savvy with all of this but would be willing to allow you to guide me :)

      Reply
    • Boah says:
      Jul 4, 2012 at 2:34 pm

      Sure, send me an email!

      Reply
  47. zifana says:
    Apr 21, 2012 at 11:25 am

    thanks..i use wordpress seo,but not with sitemap,because have no idea to fix this error

    Reply
  48. Stephen Cronin says:
    Apr 19, 2012 at 11:35 pm

    Hmm, I think the second part is going to cause the rewrite rules to be flushed on every page load, which <a href=”http://codex.wordpress.org/Rewrite_API/flush_rules”>the Codex</a> warns not to do due to performance issues:
     
    <blockquote>Because this function can be extremely costly in terms of performance, it should be used as sparingly as possible – such as during activation or deactivation of plugins or themes. Every attempt should be made to avoid using it in hooks that execute on each page load, such as init.</blockquote>
     
    I’m guessing that’s why Joost isn’t doing that by default :)
     
    Of course, I could be wrong because I don’t know his plugin well enough.

    Reply
    • jonbish says:
      Apr 20, 2012 at 1:29 pm

      I was under the same impression when this article came through my RSS. I’m pretty sure going to your permalinks settings page would accomplish the same thing without having to flush the rewrite rules every time the page loads.

      Reply
      • yoast says:
        May 15, 2012 at 8:42 am

         @jonbish Unless you’re running a crappy plugin or theme that DOES flush on every pageload before this plugin gets a chance to get its rewrites in.

        Reply
        • wpbeginner says:
          May 15, 2012 at 9:00 am

           @yoast  @jonbish Yes we understand that this is probably a compatibility issue. Yoast sitemaps work fine on our sites. We had to do this on a client’s site.

        • yoast says:
          May 15, 2012 at 9:09 am

           @wpbeginner  @jonbish I know YOU understand, question is: do your readers :) We’re working on a fix for these kinds of issues in core btw: http://core.trac.wordpress.org/ticket/18450

        • wpbeginner says:
          May 15, 2012 at 9:26 am

           @yoast  @jonbish Added a note at the beginning of this article, so users understand as well :)

    • yoast says:
      May 13, 2012 at 2:52 pm

      You’re 100% right Stephen. Something else *is* doing it on each pageload, which forces this “fix”, which isn’t a fix but a workaround for a broken theme or other plugin…

      Reply
      • Boah says:
        Jul 15, 2012 at 1:56 pm

        And now? It seems a lot of people can’t use your plugni as intended.

        Reply
  49. JustinVelthoen says:
    Apr 19, 2012 at 3:51 pm

    Thanks! I was about to switch to All-In-One because I kept getting sitemap issues. 

    Reply
  50. DrorBekerman says:
    Apr 19, 2012 at 1:18 pm

    Do you know what to do when the sitemap returns a blank page?

    Reply
    • icejava says:
      Aug 31, 2013 at 9:26 am

      Its probably not blank, just how your browser renders XML (maybe Chrome, mine does it too). View the source code of the page and you shall see the light ;)

      Reply
      • Editorial Staff says:
        Sep 3, 2013 at 3:27 pm

        This happens for a few reasons. Either you’re running low on memory. Two the file that generates the visual layout in your /wp-content/ directory is not working properly. Perhaps because you blocked the php execution?

        Reply
1 2 3 »

Leave a Reply Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.

Over 1,320,000+ Readers

Get fresh content from WPBeginner

Featured WordPress Plugin
WPForms Logo
WPForms
Drag & Drop WordPress Form Builder Plugin. Learn More »
How to Start a Blog How to Start a Blog
I need help with ...
Starting a
Blog
WordPress
Performance
WordPress
Security
WordPress
SEO
WordPress
Errors
Building an
Online Store
Useful WordPress Guides
    • 7 Best WordPress Backup Plugins Compared (Pros and Cons)
    • How to Fix the Error Establishing a Database Connection in WordPress
    • Why You Need a CDN for your WordPress Blog? [Infographic]
    • 30 Legit Ways to Make Money Online Blogging with WordPress
    • Self Hosted WordPress.org vs. Free WordPress.com [Infograph]
    • Free Recording: WordPress Workshop for Beginners
    • 24 Must Have WordPress Plugins for Business Websites
    • How to Properly Move Your Blog from WordPress.com to WordPress.org
    • 5 Best Contact Form Plugins for WordPress Compared
    • Which is the Best WordPress Popup Plugin? (Comparison)
    • Best WooCommerce Hosting in 2021 (Comparison)
    • How to Fix the Internal Server Error in WordPress
    • How to Install WordPress - Complete WordPress Installation Tutorial
    • Why You Should Start Building an Email List Right Away
    • How to Properly Move WordPress to a New Domain Without Losing SEO
    • How to Choose the Best WordPress Hosting for Your Website
    • How to Choose the Best Blogging Platform (Comparison)
    • WordPress Tutorials - 200+ Step by Step WordPress Tutorials
    • 5 Best WordPress Ecommerce Plugins Compared
    • 5 Best WordPress Membership Plugins (Compared)
    • 7 Best Email Marketing Services for Small Business (2021)
    • How to Choose the Best Domain Registrar (Compared)
    • The Truth About Shared WordPress Web Hosting
    • When Do You Really Need Managed WordPress Hosting?
    • 5 Best Drag and Drop WordPress Page Builders Compared
    • How to Switch from Blogger to WordPress without Losing Google Rankings
    • How to Properly Switch From Wix to WordPress (Step by Step)
    • How to Properly Move from Weebly to WordPress (Step by Step)
    • Do You Really Need a VPS? Best WordPress VPS Hosting Compared
    • How to Properly Move from Squarespace to WordPress
    • How to Register a Domain Name (+ tip to get it for FREE)
    • HostGator Review - An Honest Look at Speed & Uptime (2021)
    • SiteGround Reviews from 4464 Users & Our Experts (2021)
    • Bluehost Review from Real Users + Performance Stats (2021)
    • How Much Does It Really Cost to Build a WordPress Website?
    • How to Create an Email Newsletter the RIGHT WAY (Step by Step)
    • Free Business Name Generator (A.I Powered)
    • How to Create a Free Business Email Address in 5 Minutes (Step by Step)
    • How to Install Google Analytics in WordPress for Beginners
    • How to Move WordPress to a New Host or Server With No Downtime
    • Why is WordPress Free? What are the Costs? What is the Catch?
    • How to Make a Website in 2021 – Step by Step Guide
Deals & Coupons (view all)
Rocket coupon code
Rocket Coupon
Get 50% OFF on Rocket managed WordPress hosting plans for 3 months.
SendinBlue Coupon Code
Sendinblue Coupon
Get Sendinblue, a powerful marketing automation toolkit for small businesses, for FREE.
Featured In
About WPBeginner®

WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide quality tips, tricks, hacks, and other WordPress resources that allows WordPress beginners to improve their site(s).

Join our team: We are Hiring!

Site Links
  • About Us
  • Contact Us
  • FTC Disclosure
  • Privacy Policy
  • Terms of Service
  • Free Blog Setup
  • Free Business Tools
  • Growth Fund
Our Sites
  • OptinMonster
  • MonsterInsights
  • WPForms
  • SeedProd
  • Nameboy
  • RafflePress
  • Smash Balloon
  • AIOSEO

Copyright © 2009 - 2021 WPBeginner LLC. All Rights Reserved. WPBeginner® is a registered trademark.

Managed by Awesome Motive | WordPress hosting by SiteGround | WordPress Security by Sucuri.