Support » Plugin: Yoast SEO » [Plugin: WordPress SEO by Yoast] disable XML sitemap automatic pinging for google and bing

Viewing 15 replies - 1 through 15 (of 17 total)
  • 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.

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

    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.

    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

    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.

    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 🙂

    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)
    		//	if ( defined( 'YOAST_SEO_PING_IMMEDIATELY' ) && YOAST_SEO_PING_IMMEDIATELY )
    		//		wpseo_ping_search_engines();
    		//	else
    				wp_schedule_single_event( ( time() + 86400 ), 'wpseo_ping_search_engines' );
    		}

    Hi
    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.

    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.

    @hendrikepinpinga,

    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 🙂

    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.

    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.

    nice,

    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.

    Hendrik

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

    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.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: WordPress SEO by Yoast] disable XML sitemap automatic pinging for google and bing’ is closed to new replies.