Jump to content

Please, add sitemap ping when sitemap.php change!


ipbfuck

Recommended Posts

Yesterday, about 20:00 (8pm) i've write an article in pages.

Now (14:00 - 2pm) is still not present in google.

I search in sitemap, and is present.

A simple:

http://www.google.com/webmasters/sitemaps/ping?sitemap=https://laltroweb.it/sitemap.php

and now my sitemap is "refreshed" in google webmaster tool".

Also:

http://www.bing.com/webmaster/ping.aspx?siteMap=https://laltroweb.it/sitemap.php

for bing.

-

Maybe a "auto ping" on sitemap.php change, can be a good feature ^_^

-

atm i'll try to add via php/cron...

 

edit: with this - cron every 6hrs - seems to work fine for me (reply is 200 without -q).

0 	0,6 	* 	* 	* wget -q --spider http://www.bing.com/webmaster/ping.aspx?siteMap=https%3A%2F%2Flaltroweb.it%2Fsitemap.php
0 	0,6 	* 	* 	* wget -q --spider http://www.google.com/webmasters/sitemaps/ping?sitemap=https%3A%2F%2Flaltroweb.it%2Fsitemap.php

 

thanks in advance...

S.N.

Link to comment
Share on other sites

I think that it's already done, but not on all generation. I checked my sitemapgenerator log and I just seen that:

Sitemap URL has been submitted to search engines within the last 24 hours already (skipping)

Sitemap URL has been submitted to search engines within the last 24 hours already (skipping)

Edit: Yes they do it, but 1 time every 24hours

/**
	 * Ping search engines to notify of updates
	 *
	 * @return	void
	 * @note	Yahoo! search is being replaced by Bing and ask.com/moreover.com no longer accept sitemap submissions
	 */
	public function pingSearchEngines()
	{
		/* Search engines don't want to receive more than one ping in a 24 hour period */
		if( \IPS\Settings::i()->sitemap_last_ping > time() - 86400 )
		{
			$this->log[] = 'sitemap_ping_already24';
			return;
		}

		/* Ping Google */
		$response	= \IPS\Http\Url::external( "http://www.google.com/webmasters/tools/ping?sitemap=" . urlencode( $this->sitemapUrl ) )->request()->get();
		if( $response->httpResponseCode != 200 )
		{
			$this->log[] = 'sitemap_ping_google_fail';
		}
		else
		{
			$this->log[] = 'sitemap_ping_google_success';
		}

		/* Ping Bing */
		$response	= \IPS\Http\Url::external( "http://www.bing.com/ping?sitemap=" . urlencode( $this->sitemapUrl ) )->request()->get();

		if( $response->httpResponseCode != 200 )
		{
			$this->log[] = 'sitemap_ping_bing_fail';
		}
		else
		{
			$this->log[] = 'sitemap_ping_bing_success';
		}

		/* Update last ping time */
		\IPS\Db::i()->update( 'core_sys_conf_settings', array( 'conf_value' => time() ), array( 'conf_key=?', 'sitemap_last_ping' ) );
		\IPS\Settings::i()->sitemap_last_ping = time();
		unset( \IPS\Data\Store::i()->settings );
	}

 

Link to comment
Share on other sites

one time every 24hrs... then an article can be reported to google after 23,59hrs! this can be bad!

i've put cron every 6hrs.

 

i think a simply: report immediately every time sitemap change (max one time every hour, like google ask to do) can be a best way.

with this, an url will be report to google with less delay!

 

In some old docs i found this:

https://productforums.google.com/forum/#!topic/webmasters/Y_AN-eLSvhk

Quote

"We recommend that you resubmit a Sitemap no more than once per hour"

hour... no day :p

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...