Sunday, November 18, 2007

How to add multiple sites with the same root directory to your MSN Webmaster tools

Some may not even know that MSN has a set of webmaster tools to track your websites' position in the search engine. For those who don't yet know about the tools, you can find them at They are a far cry from the robust tools available from Google, but they're a good start. I track only my most important websites in the MSN tools (at least for now).

One problem I ran into was in the verification process. MSN requires you to either add an XML file to the root directory of your site, or add a META tag to your home page HTML file.

I use a Content Management System that allows me to build hundreds of web pages using the same database, file structure, and index file. Each page is built dynamically at run time based on the request from the user (what URL, which page, etc.).

This left me with a problem - I could add a new META tag to my default HTML file for each site that I track, or I could add the XML file to the root directory. Since hundreds of websites share the same default HTML file, it seemed inefficient to add the overhead for thousands of requests per hour to that file. Instead, I added the XML file to the root directory.

Here's where it got tricky. The file name is always the same for each website (LiveSearchSiteAuth.xml), but the content is different. It's a fairly simple XML file with a single Users attribute with multiple users nested with user tags. The first site I added was easy; I simply copied and pasted the text it gave me into the XML file and copied that into the root directory of the site.

The rest were a bit harder, but once I had it figured out, they were also easy. Instead of copying all the XML code that Microsoft gives you, only copy the information between the start and end users tags and add it onto the end of the file you created. You can add as many users tags as you would like - one for each website you want to track.

I don't think there's a limit - I have over 10 right now, and I assume that I can add as many as I'd like to the file.