Hi Guti, I’m working on my own plugin with desired functionality. Would you like to test it?
Thread Starter
Guti
(@gutibitacorascom)
Of course @zabatonni it would be great. I was trying mihdan-index-now and then tried bing’s one. No one was complete (IMHO).
I published it here: https://github.com/zabatonni/zaba-indexnow
You need to have PHP 7.3+, working cronjob and defined constant key in wp-config.php before activating. Plugin will tell you right after activation.
There are some missing features like writing logs on errors received from indexnow api.
But it should work seamlessly without even knowing it’s there. Let me know if you had any trouble.
Thread Starter
Guti
(@gutibitacorascom)
Hi again,
I like the approach of storing the key in the wp-config file in order to avoid extra database queries, and polluting the wp-options table. Also like that a new comment triggers the ping, something that Bing’s plugin does not have. But there are some features I am still missing:
1) Ability to ping other engines (Yandex for instance), something that mihdan’s implementation did.
2) Ability to limit pinging same URL in 10 minutes (that is the recommendation, to not request reindexing more frequently than that).
So far it is working nicely.
1. It is pinging https://api.indexnow.org/indexnow. In documentation they say it pings all participating search engines:
IndexNow-enabled search engines shares immediately all URLs submitted to all other IndexNow-enabled search engines, so you just need to notify one endpoint.
2. This is where I got it wrong. I throttle pinging completely. So it is not pinging twice in 10 minutes, but doesn’t care about url.
Can you please make it more clear? It should be pinging immediately, but only once per 10 minutes for the same url? It means it will be pinging more than once per 10 minutes, if url is different.
Thread Starter
Guti
(@gutibitacorascom)
According to Bing, you should not ping the same URL more frenquently that 10 minutes. So let’s say that a post if modified 2 times, you will send two pings, even if no 10 minutes has been elapsed.
Most probable case. Asume a new post that gets a lot of comments. Each time a comment is posted the URL will be pinged, even if 10 minutes have not passed.
ok, done, now it’s throttling per url. Code is update on https://github.com/zabatonni/zaba-indexnow
You can set “expiration” in wp-config:
define('ZABA_INDEXNOW_THROTTLE',600)
If you don’t set, it will be 600 seconds by default.