Magento has good support for generating a Google Sitemap XML file, there are just a few steps to the process.
- Enable Magento’s cron system – see here for details.
- Enable Google Sitemap in the Magento admin:
System > Configuration > Catalog > Google Sitemap > Generation Settings  You can also alter the frequency and priority options of the categories, products etc.. I find the defaults are fine. 
- Add a sitemap file
Catalog > Google Sitemap > Add Sitemap  
- Generate the sitemap so it exists.
  
 Cron will update the file ongoing according to your generation settings in step 2.
- Submit your sitemap to Google – see here for details.
And you’re good to go.






