Yoast SEO
[Plugin: WordPress SEO by Yoast] disable XML sitemap automatic pinging for google and bing (18 posts)

  1. jumbo
    Posted 2 years ago #


    It looks like Yoast automatically pings Google and Bing the updated sitemap when a page is published. Is there any way to disable this pinging without disabling the sitemap feature?

    Secondly, does Yoast ping when a page is updated, or only when its first published?



  2. rvlawrence
    Posted 2 years ago #

    I would like to know this as well. I am already using a pinging plugin and don't want to ping services like Google twice! It could wreck my SEO efforts. Yoast please explain.

  3. rvlawrence
    Posted 2 years ago #

    Still looking for an answer. Somehow my posts on my site at http://membershipexpert.com/ are still pinging twice.

  4. astrasuite
    Posted 2 years ago #

    I see that it is pinging Google when a post is updated or created.

    Since Yoast does not reply, maybe we can just disable the Sitemap until we really have the final post.

    Question now is, if we re-enable Sitemap, will it see the change ? And if there is no change, will it ping anyway just because it is re-enabled ?

    Will try it out ...

    I don't think we can prevent it from pinging though, unless we go into the code and stop the pinging, and submit manually instead to Google.

  5. astrasuite
    Posted 2 years ago #

    Well, I had a lot of posts to edit while adding in a rel="alternate" hreflang="x" using Add Meta Tags plugin, so had to totally disable pinging, which in this scenario is anti-SEO, counter to the very basis of WordPress SEO.

    Changed inc/wpseo-functions.php, commented out these 2 lines :

    // wp_remote_get( 'http://www.google.com/webmasters/tools/ping?sitemap=' . $sitemapurl );
    // wp_remote_get( 'http://www.bing.com/webmaster/ping.aspx?sitemap=' . $sitemapurl );

    Seems ok after trying, note that I am no programmer, I just edit out of trial and error

  6. rvlawrence
    Posted 2 years ago #

    Hope this gets fixed soon. It's been going on 8 months and no response from Yoast.

    If this is pinging Google with every post update it's the exact OPPOSITE of good SEO. Hard to believe this would be allowed to remain.

    Maybe it's gone by now? Who knows.

    Yoast please reply and update us all. Thanks.

  7. astrasuite
    Posted 2 years ago #

    Well, the code change above works against instant pinging.

    However, I saw that after a few hours, Webmaster Tools shows that the sitemap is Pending again, which means it was pinged. This is still fine, at least I can do several edits without worrying about excess pinging. Why do I edit several times ? Well, I change my mind sometimes, or correct something.

    So why is it pinging ? I then remembered Joost mentioning something about a cron in the change log. So I installed the plugin
    WP Crontrol (http://wordpress.org/extend/plugins/wp-crontrol/).

    Voila, there is a cron to ping. And other crons I have never known about before. So it's great, now I can optimize the cron jobs to what I feel like ... you learn something everyday :)

  8. astrasuite
    Posted 2 years ago #

    Well, I changed the code again after learning about crons, restored original inc/wpseo-functions.php, and instead modified class-sitemaps-admin.php. Commented out some lines and changed time from 300 (5 minutes) to 86400 for the cron job. That's 1 day for me to do as many edits before it pings.

    Anyway, all the best to others in solving the issue ...

    // Allow the pinging to happen slightly after the hit sitemap index so the sitemap is fully regenerated when the ping happens.
    		if ( wpseo_get_value( 'sitemap-include', $post->ID ) != 'never' ) {
    		//  jcr (that's me)
    		//		wpseo_ping_search_engines();
    		//	else
    				wp_schedule_single_event( ( time() + 86400 ), 'wpseo_ping_search_engines' );
  9. hendrikeppinga
    Posted 2 years ago #

    thanks for the good tip!

    but will the above code not fire all the events 24 hours later instead of all within 5 minutes, it looks you are only delaying the firing of all the events.

  10. hendrikeppinga
    Posted 2 years ago #

    I changed the line to

    wp_schedule_single_event( strtotime('tomorrow 01:00:00') , 'wpseo_ping_search_engines' );

    WordPress fires only 1 event if several with the same name are scheduled within 10 minutes from each other.

  11. astrasuite
    Posted 2 years ago #


    Well, I did not touch the cron code generating the sitemaps. They still get generated about 5 minutes after any update or new post. Pinging is 24 hours later, giving me time to do any changes I want within 24 hours.

    As for pinging, I think it's still the original concept of pinging the search engines all at the same time.

    But thanks for the code, it's something I could use :)

  12. hendrikeppinga
    Posted 2 years ago #

    You are welcome,

    I changed it now at my site.. I do a lot of small changes as well.
    The sitemap is regenerated as normal and the pinging occurs now at 1 am (as soon as somebody hits the website after 1 am).. and the crawler also reads the sitemap himself as well.

    no more excessive pinging now.. several events will be scheduled now at the same time and only one is fired..
    I could use your code also but then you still get a ping for each change, all with the same sitemap, but all 24 hours later, and not within the original 5 minutes.

  13. astrasuite
    Posted 2 years ago #

    I understand it now, that's a good idea, all at particular time ...

    Did some testing and observing of behavior with the code I have using Crontrol plugin:

    - If I have no scheduled ping search engine, and I update or add a post, the ping is scheduled for 24 hours.

    - Any next change or update will generate a new sitemap after 5 minutes.

    - Any next change or addition does not add any new ping schedule (no several events, just one). Also, if the schedule is 23 hours remaining, for example, it will not go back to 24 hours, but remain on track.

    You can try it, I think even with your code, there will only be one ping event, not several.

  14. hendrikeppinga
    Posted 2 years ago #


    have you tried to do 2 changes on a post with at least 10 minutes interval?
    Wordpress has a check that the same events within 10 minutes only is fired once.


  15. astrasuite
    Posted 2 years ago #

    Sure, will try right now ... 10 minutes already has gone past since I lat updated.

  16. astrasuite
    Posted 2 years ago #

    Ok, confirmed, still the same event, no additional ping event. Here is the event:

    wpseo_ping_search_engines [] 2013/06/15 15:04:54 (22 hours 52 minutes)

    It shows the ping schedule got initiated slightly more than 1 hour ago, and nothing will sway its course unless I delete it.

    And here is the create sitemap cron doing its thing, 1 minute past already:

    wpseo_hit_sitemap_index [] 2013/06/14 16:16:54 (4 minutes)

    If I update anything before it is finished in 5 minutes, it also does not add a new create sitemap event.

  17. hendrikeppinga
    Posted 2 years ago #

    the changes I did, (less bothering google with sitemap pings) has helped.

    I use the SEO Serp extension in Chrome which lets me check how I rank with my site for certain keywords (this one does not interfere with my previous clicks, location etc)

    and it shows now that my site http://www.touretappe.nl ranks at #26 on keyword "tour de france" and about #30 this morning.... there is a small increase to notice in a few hours.

    Not sure if it is only the decrease in sitemap pings, but the changes are big.

  18. garratt
    Posted 2 years ago #

    Websites bounce around all the time. Like I have a client who if I check the keyword at work shows position#1 but when I check at home Position#4. After a couple days from home it's #1 then at work it's #4... work and home are only 20 minute drive from each other, and home is closer to actual client business location.

    To be honest I've used various tools showing different positions, I think Google just likes to bounce you around a fair bit, especially when you are updating your site regularly. The more dormant your site the more stable your rankings I think. I don't believe pinging would have anything to do with it but I'm not a Google employee so I don't know for sure.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic