2

When I submit my sitemap to Bing search engine with curl on my server in Germany, the returned message is in German. Can someone help me to ensure it is always returned in English?

This is the returned message:

Vielen Dank für das Übermitteln Ihrer Sitemap. Melden Sie sich bei den Bing Webmastertools an, um Ihren Sitemaps-Status und weitere Berichte zu Ihren Besucherzahlen auf Bing abzurufen.

I used this code:

http://www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml
  • Beats me dude. I wish I knew what to tell you. All I can say is, It's Bing! That's Microsoft to the rest of us. – closetnoc Mar 31 '16 at 0:27
2

By default Bing will reply in the native language that it thinks is correct based on the location of the user. This is why you are receiving a response in the language of the region your server is located.

For a regular browser you are able to change which language you would like to be used in the Bing Setting Page. This just sets a cookie with what ever language you choose.

In order to get a reply in English you will have to send along this information in a cookie with your curl request.

Here I have added a cookie named "_EDGE_CD" with the value of "u=en-us", you could change "en-us" to which ever language/location preset you wish to use.

curl -b '_EDGE_CD=u=en-us' http://www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml

Tests from my server located in France:

Without Cookie

# curl http://www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml
<html><body>Merci dâavoir envoyé votre Sitemap. Utilisez les <a href="/webmaster">Outils pour webmasters de Bing</a> pour voir le statut de vos Sitemaps et davantage de rapports sur la manière dâutiliser Bing.<!-- SiteCatalyst code version: H.1. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --><script language='JavaScript'>var s_account='msnportalbingwebmaster';</script><script language='JavaScript' src='/webmaster/content/s_code.js'></script><script language='JavaScript'>s.linkInternalFilters='javascript:,';s.trackExternalLinks=true;s.pageName='ping_sitemap';s.server='www.bing.com';s.channel = 'Webmaster';s.prop2 = 'fr-FR';s.eVar3 = 'fr-FR';s.prop5 = '';s.eVar5 = '';s.prop22 = '';/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/var s_code=s.t();if(s_code)document.write(s_code)</script><script language='JavaScript'><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')//--></script><noscript><img src='https://102.112.2O7.net/b/ss/msnportaldev/1/H.1--NS/0' height='1' width='1' border='0' alt='' /></noscript><!--/DO NOT REMOVE/--><!-- End SiteCatalyst code version: H.1. --></body></html>

With Cookie:

curl -b '_EDGE_CD=u=en-us' http://www.bing.com/webmaster/ping.aspx?siteMap=http://exampel.com/sitemap.xml
<html><body>Thanks for submitting your Sitemap.  Join the <a href="/webmaster">Bing Webmaster Tools</a> to see your Sitemaps status and more reports on how you are doing on Bing.<!-- SiteCatalyst code version: H.1. Copyright 1997-2005 Omniture, Inc. More info available at http://www.omniture.com --><script language='JavaScript'>var s_account='msnportalbingwebmaster';</script><script language='JavaScript' src='/webmaster/content/s_code.js'></script><script language='JavaScript'>s.linkInternalFilters='javascript:,';s.trackExternalLinks=true;s.pageName='ping_sitemap';s.server='www.bing.com';s.channel = 'Webmaster';s.prop2 = 'en-US';s.eVar3 = 'en-US';s.prop5 = '';s.eVar5 = '';s.prop22 = '';/************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/var s_code=s.t();if(s_code)document.write(s_code)</script><script language='JavaScript'><!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')//--></script><noscript><img src='https://102.112.2O7.net/b/ss/msnportaldev/1/H.1--NS/0' height='1' width='1' border='0' alt='' /></noscript><!--/DO NOT REMOVE/--><!-- End SiteCatalyst code version: H.1. --></body></html>

Keep in mind that if Bing changes the names of either the cookie name or cookie value this will no longer work. Though it will gracefully fail and just revert to using the default language that Bing chooses.

  • 1
    thanks @Analog work 100% ,and cant vote up to you because my rep < 15 – Hosam alzagh Mar 31 '16 at 7:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.