The built-in option for Magento simply takes all the products and makes the sitemap. Which will work for 95% of the stores out there. But if your working on a really custom shop you might want to create your own. This one shop I'm working on has all Configurable Products so I do not want the simple products showing in my sitemap.
I also want to turn off categories like "featured" that I use for sliders and such.
Create File to Overwrite
Create a file called "my_sitemap.xml" in your root.
You can download the freshest code from our GitHub Gist.
Change Site Source
Enter Your.com in the Base Variable
Make sure your Flat File Index is updated in the Magento Admin. Then, either run it manually when you make a change or set up a cron job.