Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi all,
anyone that knows how to ping google with a new sitemap after publishing a content node?
Hooking into the publish event and then call the google ping url:
http://www.google.com/webmasters/sitemaps/ping?sitemap=[your sitemap web address]
/Michaël
Have you checked these links out?
Umbraco Content Service events
Yes I know about the events but its the ping piece that I have trouble with of how to do this inside these events.
Since its an url, I think you just need to make a httprequest.
There are multiple ways to do this in C#, one of them is the following
var httpWebRequest = (HttpWebRequest)WebRequest.Create(new Uri("http://www.google.com/webmasters/sitemaps/ping?sitemap=[your sitemap web address]")); httpWebRequest.ContentType = "text/json"; httpWebRequest.Method = "GET"; httpWebRequest.GetResponse();
There are async variant available. Another way is using the HttpClient
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Ping Google after publish
Hi all,
anyone that knows how to ping google with a new sitemap after publishing a content node?
Hooking into the publish event and then call the google ping url:
/Michaël
Have you checked these links out?
Umbraco Content Service events
Yes I know about the events but its the ping piece that I have trouble with of how to do this inside these events.
/Michaël
Since its an url, I think you just need to make a httprequest.
There are multiple ways to do this in C#, one of them is the following
There are async variant available. Another way is using the HttpClient
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.