subscribe via rss subscribe via mail subscribe via twitter

Ping Search Engines for Your Sitemap

Posted in SEO, January 1st, 2010 and has 4 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 in your the 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! :/)

Follow Discussion

Leave a Reply