I am trying to dynamically create a sitemap for my site and I wan't it to be (I believe it is necessary to have it) located at the root level, ie. Domain.com/sitemap.xml 
So far I have an action result in the home controller like this:

```
public ActionResult SiteMap()
{
    ...
    return this.Content(xml, "text/xml");
}

```

This works fine for creating the file but it is located at Domain.com/Home/Sitemap and my understanding is the the sitemap is supposed to be located at the root level. Is there a way to rewrite the url or add a new route for it in the Global.asax file? By default the Global.asax file contains this:

```
routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

```

So it seems like this may be the place to add something like a check if the requested route is Sitemap.xml and just redirect it to Home/sitemap (or just serve the sitemap right there). I'm not sure how to do this, if it is possible, as I have never messed around with the RegisterRoutes section.

Another problem that may arise would be the extension .xml, I would think that IIS would think this is a file on the drive and ignore the route all together.

Am I going down the correct path, or is there a better way to do this? Or is it not possible and I have to just physically create the file?

**Edit (Solved)**
I just occurred to me that I have been thinking about this the wrong way. All I would have to do is have a method to create/update a sitemap file and save it to /sitemap.xml periodicity or every time a page is added. I can't believe this wasn't obvious to me.