How to add additional pages to sitemap.axd

By Alan S. at April 16, 2010 08:50
Filed Under: General, Web / Software Development

Here at eSource, we use blogengine.NET to run our blog. There are many other platforms out there for IIS that offer the same functionality, and they all offer the same basic bells and whistles.

 

One really neat feature is the sitemap.axd file. It actually doesn’t exist in hard form, it is created on the fly (as requested) and returns the latest list of all pages within the blog library. The problem with blogengine.NET and other major IIS blog providers is that they don’t let you add additional sites to the sitemap.axd file unless they are part of the overall blog database. For eSource (and other blogs) it is necessary to have a sitemap that is created in real time to ensure the latest pages are added, but also include some pages that are outside of the administration page listings in the control panel.

 

Download the .EXE and config sile: Sitemap2XML.zip (3.91 kb) 

(requires IIS7 or greater with .NET Framework 2.0 or greater).

 

This is not a big deal when submitting your sitemaps to Google, but Yahoo and Bing only allow one sitemap to be assigned to each site. In Google’s case, you would simply specify sitemap.axd as the main sitemap, then add a manually created .XML file to include all of your otherwise non indexed pages. But for the other two, the task needed a little more creativity.

 

We created Sitemap2XML for IIS 7 and above. It is comprised of 2 files, an .EXE (Sitemap2XML.exe) and a configuration file (Sitemap2XML_Config.txt). The program connects to the website’s sitemap.axd file specified in the configuration file and appends a list of additional URL’s to the end, then writes that out to a specified file, usually sitemap.xml.

 

Here is a sample of the configuration file:

   1: ; URL is the actual URL of the sitemap file (usually axd)
   2: url=http://mysite.com/sitemap.axd
   3: ; outputfile (optional) determines where the results of this program are written
   4: ; Default is Sitemap2XML_OUT.xml
   5: outputfile=c:\inetpub\wwwroot\mysite\sitemap.xml
   6: ; changefreq (optional) determines how often you want to specify changes to the page
   7: changefreq=monthly
   8: ; lastmod (optional) specify a date or use "_Today" to use today's date 
   9: lastmod=_Today
  10: ; addpage: include all additional pages that will be added to the output file
  11: addpage=http://mysite.com/page1.html
  12: addpage=http://mysite.com/page2.html

To install the program on your IIS server:

  • Unzip the contents to any directory.
  • Modify the Sitemap2XML_Config.txt file. Be sure your output file is in your website’s path
  • Run the program in a DOS window to test. the program creates a log in the running directory.

image

 

Now the sitemap.xml file includes BOTH sitemap.axd results plus our additional sites.

image

The best way to keep this file up to date is to add it to the scheduled tasks on your server. Now, when you add your site to the webmaster tools of Yahoo or Bing, specify the sitemap.xml file that the program creates. This file will include the output from sitemap.axd and the additional URL’s you specify in the configuration file.

Bookmark and Share DotnetKicks dotnetshoutout


   

eMail Scraper
Generate email lists in seconds!


eSource Development presents the ultimate tool for email lead generation! They have decided to release the hottest email list generation tool that allows you to get hundreds (even THOUSANDS) of specific email addresses for any genre, niche, or geographical area.

Internet marketing companies and professionals have been using this tool for years. Now, it has been re-engineered, updated, and released to the public. This 'insider only' software was a closely guarded industry secret until recently.



Watch the Demo

NEW! Trial version available!

DOWNLOAD FOR FREE




  


Dr. Torgo's PC
System Inventory v2.0


Dr. Torgo's PC System Inventory offers a full range of system query options and powerful reporting tools. This software quickly generates reports on several dozen hives of system information including disks, CPU, memory, motherboard, users, ports, services, software, and MORE.

Read more here!

NEW! Trial version available!
DOWNLOAD FOR FREE


Help us out by visiting our sponsors!

Protect Your Business







Recent Comments

Comment RSS

What We're Playing





Who's Watchin' Me?