How to Use ColdFusion to Ping the Ask, Google, MSN, and Yahoo Sitemap Services
Sitemaps help web crawlers to do a better job of crawling your site. If your content is continously updated, then you should let the search engines know that your XML file of all your site links has been updated. To date, Ask, Google, MSN, and Yahoo support the Sitemap 0.90 protocol. Visit sitemaps.org for the sitemap XML format, if you haven’t already created one. There are also websites that will create a sitemap for you.
Here is a solution you can use in your ColdFusion applications which will alert the four major search engines that your sitemap has been refreshed.
The code is fairly easy. First, we wrap our code in a <cftry> with a <cfcatch> if something goes wrong. Then, we use the <cfhttp> tag to send a request to the sitemap ping service specified by the particular search engine. The "redirect" attribute is important because, by default, <cfhttp> will redirect to the URL specified in the tag. We choose "no" to allow for multiple pings in one process. After the ping is made to the service we set a variable for the header status code. 200 OK is a successful request and 404 Not Found means the page was not accessed. Once all of the selected pings have run, the use <cfmail> to email the results.
Ask: #AskPingStatus#
Google: #GooglePingStatus#
MSN: #MSNPingStatus#
Yahoo: #YahooPingStatus#
#cfcatch#
This code can be run either when a sitemap is updated, or as a scheduled task. I prefer to ping the sitemap services when I create my feed.
Did you find this ColdFusion code useful? Let me know.



ahh, very clever use of coldfusion. as much as the big 4 claim to listen to your robots.txt file, they have allot of room to improve.
your readers may appreciate a quick refresher on the basics of creating a proper sitemap.xml file: http://blog.shofr.com/2007/development/seo-101-sitemaps/
have you the link for german language too? if yes - please post here.
Hello Suchmaschinenoptimierung,
I believe the URL to ping Google is as follows:
http://www.google.de/webmasters/sitemaps/ping?sitemap=
http://YOURDOMAIN/sitemap.xml
As for the others I don’t, know but I can ask around for you.
thanks for the info this can be very useful.
is this needed for google if you use the webmaster tools?
Can this be saved as a php file and after updating my sitemap I can just run the file from the browser?
Thanks!
You could use crawlscore.com to generate the sitemaps on a regular basis.
Thanks for the Link Jason!