What is the best way to generate a sitemap?

Zakaria picture Zakaria · Mar 7, 2010 · Viewed 10.7k times · Source

I need to build a sitemap for my website. The url will be "www.example.com/mysitemap.html". I know that there are some tools that generate automatically an XML file that contains the reachable URLs and also improve the SEO.

So my questions are: How can I build this HTML page going from the generated XML? Or am I wrong and this kind of HTML page is built manually? If not, how do we integrate the XML and convert it to the website?

Thank you very much. Regards.

Answer

Sinan picture Sinan · Mar 7, 2010

If your site architecture is contained in a database (like a CMS) you can do something like Darkyo suggested.

However there are easier methods. There are many free services which crawl your site and create a sitemap

http://www.xml-sitemaps.com/ or http://sitemapdoc.com/ are some examples but the Internet is full of them. Just google "sitemap creator".

If you want to create your own script there is program called "php sitemap ng" at http://enarion.net/google/phpsitemapng . This can be a real good starting place.