tags:

views:

100

answers:

4

Hi everybody, 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.

A: 

It really depends of how is programmatically build your website, if your website is huge and reflects a db schema, the best thing is to write a friendly url generator and store it to the db.

Thank to this system you'll be able to manage retrieve your sitemap easilly

Select CONCAT("http://mysite.com/article/",article.friendly_url) from article 

But as I said it highly depends of your architecture / programming ....

Darkyo
A: 

Automatically is very hard. You can help though, by using correct semantics.

This will make Google pick up your site's structure better.

When your website consist of static pages you can create a sitemap yourself. If though it is generated with a database you can do this programmaticly. This won't be easy though if you have no experience.

If you use a CMS like Wordpress or Drupal or ... you probably can generate it with a plugin. Use Google for that!

Snake
A: 

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.

Sinan
+1  A: 

If you run a content based site (like YouTube for example), just write a small script that reads your database and generates an XML file for each URL.

Put it as a cron job once every day/week. You can also ping Google/Yahoo/MSN etc. when your sitemap gets updated so they can pick your new sitemap and index the new URL's.

Gaurav Gupta