Manual:Sitemap
Sitemap, bir web sitesinin taranmasını arama motoru robotları (googlebot gibi) daha verimli hâle getiren dosyalardır (bot, site haritası protokolü).
MediaWiki supports at least three methods of generating sitemap files.
- REST API
- generateSitemap.php maintenance script
- Sitemap extensions
REST API
Starting with version 1.45, MediaWiki provides a REST API to generate a sitemap on demand.
Enabling REST API Sitemaps
Add the following line to LocalSettings.php to enable the Rest sitemap:
$wgSitemapApiConfig['enabled'] = true;
Add to robots.txt
Sitemap https://example.com/w/rest.php/site/v1/sitemap/0
Note that the REST API can draw the attention of bots, degrading site performance. The WMF has restricted access to the sitemap on all of its projects.
generateSitemap.php
If you choose not use the new REST API, then generateSitemap.php can be used as a maintenance script to generate sitemap files.
Add to robots.txt
Sitemap https://example.com/sitemap/NameOfSitemapIndexFile
Sitemap extensions
Geçmişte, bunları oluşturmak için Sitemap uzantıları kullanılıyordu.