Can an XML sitemap file by generated dynamically, or does it have to be static?

No, it doesn't matter, and it's actually a pretty good idea if you have regularly added content. It makes no difference to Google whether you wrote the file by hand, generated it manually with an online tool, generated it automatically with a cronjob, or generated it live each time the sitemap is requested.

Edit:
As danlefree suggests, you ought to consider caching in the case of large sites. (I would personally use some form of caching if your sitemap is over 200 entries. You can probably safely generate a sitemap with 100-200 pages without putting much load on the server.) If you're already using memcached, then you'll be good.

I'm not sure how often Google hits a sitemap, but you might also consider refreshing it every time Google hits it, but simply serving up the cached copy when its another host.


The search engines only see the xml you produce. They do not see the programming language you use.

Tags:

Seo

Sitemap