subscribe via rss subscribe via mail subscribe via twitter

Ping Search Engines for Your Sitemap

Posted in SEO, January 1st, 2010 and has 16 comments

by mknowles @flickr

Informing search engines that your site content has been updated is an important task. Google downloads your site-map automatically every few days, or even few hours If you are running a big website. However, Webmasters like to ping Search Engines automatically after every update on the website. Here are few links for several search engines that you may want to ping.


1. Google

http://www.google.com/webmasters/tools/ping?sitemap=http://site.com/sitemap.xml

2. Yahoo

http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&url=http://site.com/sitemap.xml

3. Bing

http://www.bing.com/webmaster/ping.aspx?siteMap=http://site.com/sitemap.xml

4. Ask

http://submissions.ask.com/ping?sitemap=http://site.com/sitemap.xml

If you are using WordPress, All-In-One-Seo does this every time you publish a new post. I have made a function if you don’t want to make the ping request manually.

File Name: pinger.php

<?php

function pingSE($url){
@file_get_contents("http://www.google.com/webmasters/tools/ping?sitemap=" . $url);
@file_get_contents("http://search.yahooapis.com/SiteExplorerService/V1/updateNotification?appid=YahooDemo&amp;url=" . $url);
@file_get_contents("http://www.bing.com/webmaster/ping.aspx?siteMap=" . $url);
@file_get_contents("http://submissions.ask.com/ping?sitemap=" . $url);
}

// using the function..

pingSE("http://site.com/sitemap.xml");

?>

Author

Mohamed Amine is a university student. He lives in Algeria, Algiers. He is interested in PHP, jQuery, and Css. He likes to play Bowling and Pool. You can follow him on Twitter and Facebook.

What's next? Help us to share this.

Comments

Want to show an avatar next to your comments? Join Gravatar.
  • I thought this was going to be another long boring blog post, but I was pleasantly suprised. I will be posting a backlink on my blog, as I am quite sure my readers will find this more than interesting.

  • prefabrik said:

    Thanks you for all!

    Perfect working and i am using now!

    Thanks again..

  • It’s a wonder there are so many sites out there that don’t even know what an xml-sitemap is. LOL

    Your code is cool. But: you should have noted that on more restrictive systems, file_get_contents might produce an error if you fetch data from urls… that’s where curl comes in. On the other hand, showing people curl might be overkill. Hmmm, but you should have put a not in there anyway… ;)

  • Here’s the CURL code: http://www.deluxe-site.com/php-sourcecode-to-ping-search-engines-using-curl.htm

    (Your comment-field didn’t let me post it here! :/)

  • I improved upon your function http://www.php-ease.com/functions/ping_search_engines.html by triggering an error if a ping was unsuccessful, and by using fsockopen(). Also, Yahoo has deprecated and will discontinue their pinging service as of December 2010. They have merged with Bing. Thanks!

  • thanks for such awonderful information but i think use cURL is better

  • Lesley Sito said:

    This submit was nicely written, and it also contains numerous practical facts. I appreciated your professional manner of writing this post. You might have created it quick for me to realize.

  • Miniclip said:

    Thank you for the info and for the Sitemap Ping Urls, I will be using them a lot :)

  • I’ve used GooglePing.com for years now and it’s very quick and effective if you want to ping search engines. Check it out!

  • kliknij said:

    I was suggested this blog by my cousin. I’m not sure whether this post is written by him as no one else know such detailed about my difficulty. You are wonderful! Thanks!

  • Desi said:

    Thanks. I was looking for something like this so I can just setup a cron job and submit sitemap everyday to search engines.

  • coolpintud said:

    Thank you for the info and for the Sitemap Ping Urls, I will be using them a lot but tell me first its legal to use then because I do not want to get my site banned on search engine.

  • I will definitely use this on my website

  • Yahoo have made changes but all others are working fine.

  • This is nice script but you need some crons to run it conterminously. Is there some online service to do this work ?

  • Thank you !!!!! I am using your script in my website. Thanks

Follow Discussion