Mobile app version of vmapp.org
Login or Join
Dunderdale272

: Can an XML sitemap file by generated dynamically, or does it have to be static? Does it matter if I serve sitemap.xml as a dynamic page? e.g., use .htaccess to rewrite sitemap.xml (or whatever

@Dunderdale272

Posted in: #Seo #Sitemap

Does it matter if I serve sitemap.xml as a dynamic page? e.g., use .htaccess to rewrite sitemap.xml (or whatever static URL I submitted at the Webmaster Tools) to a PHP file. The PHP file will call the DB and generate the XML file on the fly.

Does it matter if I use it like this a dynamic PHP page, or should I prepare a static page? The only downside I see is the load time of the file, but it doesn't sound too important considering this page is accessed only by SE boots

10.02% popularity Vote Up Vote Down


Login to follow query

More posts by @Dunderdale272

2 Comments

Sorted by latest first Latest Oldest Best

 

@Kevin317

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

10% popularity Vote Up Vote Down


 

@Shanna517

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.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme