Jump to content

how to create sitemap in php..?


Recommended Posts

Many of you ask what are the best free tools for creating a sitemap. It's simple: you have to create a script yourself that generates the sitemap (s), or use a sitemap plugin if you ever use a CMS . This script is very similar to the one that generates an RSS feed from elsewhere. You can do as many scripts (or options) as there are types of pages on your site (if you follow my idea of creating a sitemap file by type of pages).

Of course, you can use scripts that are completely adapted to your CMS . For example for WordPress there are plenty.

With this solution, your sitemap will be up-to-date all the time. You will never need to upload it somewhere (except to declare it to Google, see below). If necessary, manage a cache so you do not regenerate this file each time it is accessed by a crawler.

Here are the top 3 reasons why you should never use a sitemap generation tool type "crawler" (sitemap generator / sitemap generator )

why use a crawl tool instead of trusting Google's business? Do you really think that the tool you choose will outperform Google's crawler? And besides, why want to do the job of Google?
by running a crawler on your site, you request your server. If the tool you are using is poorly designed or configured, it may overload your server by asking too many pages per second.
this solution is not automated: you will have to think about launching the tool, exporting the generated file and uploading it to your server. While with the script you made, the sitemap will always be up to date.
By cons, if you use a crawler tool to do other analysis on your site, as much as to export a site map, it can still serve you.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...