Verifying Orchard-powered website on Bing Webmaster Tools

Tags: Orchard

Yesterday I tried to verify my website, powered by Orchard and hosted in Azure, in Bing Webmaster Tools.  As I already had my website deployed and running, the process was a little tricky, so I decided to share my experience.

Bing provides you with two options to complete verification.  You can add a <meta> tag containing the authentication code to the <head> section of your default webpage or you can place an XML file generated by Bing on your web server.

BingVerifyOwnership

For those who is preparing Orchard package for Azure or host it on non-Azure environment – there is a module available on Orchard gallery which allows adding <meta> tag for verification.  The only thing to notice – it includes  <meta> tag to all pages, not only to the default page.

I didn't have this module in my Orchard package, but I fortunately  had Rewrite Rules module installed, so I decided to go with option two and verify my website with XML file.  Following is how you can do that.

As first step, download BingSiteAuth.xml from Bing and upload it to your Media gallery. Click on uploaded file and copy URL displayed in Embed field.

CopyUrl

Bing requires that XML file to be placed in a root folder , so we need to redirect requests from http://your_domain.com/BingSiteAuth.xml to uploaded file. And that is where Rewrite Rules will help. Enable it, if haven't done yet, go to Settings, in Rewrite Rules section check Enable Rewrite Rules box. In Rules field add the following string:

RewriteRule  ^/?BingSiteAuth\.xml$ <url_copied_on_previous_step> [R]

For example:

RewriteRules

Save setting, go back to Bing and complete verification. 

Story comments:

blog comments powered by Disqus