XML sitemaps for search engines
- 13. April 2014 - Typo3 at xandersXML sitemaps for search engines specially prepared lists of links, include all pages of a website in a standardized XML format. They provide a useful way to capture web pages to support search engines (Google).
Information about the Google sitemap structure can be found in the support pages on Google.
If you want to avoid the use of a TYPO3 extension such as "mc_googlesitemap", so you can create a typoscript function with a corresponding functionality and the use of RealURL by your own.
The call to generate this sitemap can be included in the robots.txt (here: German and English):
Sitemap: www.yourdomain.com/de/sitemap.xml
Sitemap: www.yourdomain.com/en/sitemap.xml
Typo3
sitemap = PAGE sitemap { typeNum = 200 config { no_cache = 1 disableAllHeaderCode = 1 additionalHeaders = Content-Type: text/xml; charset=utf-8 simulateStaticDocuments = 0 # What is the base url of page? absRefPrefix = {$baseUrlProtocol}://{$baseUrl}/ tx_realurl_enable = 1 } 10 = COA 10 { wrap ( <?xml version="1.0" encoding="UTF-8"?> <urlset xmlns="http://www.google.com/schemas/sitemap/0.84" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/schemas/sitemap/0.84 www.google.com/schemas/sitemap/0.84/sitemap.xsd" >|</urlset> ) 10 = HMENU 10 { special = directory # From which root page the sitemap should be created? special.value = 185 # Sould "NotInMenu" pages be displayed? includeNotInMenu = 185 # Which sites should not appear in the site map? excludeUidList = 232 1 = TMENU 1 { expAll = 1 NO { doNotLinkIt = 1 stdWrap { cObject = COA cObject { wrap = <url>|</url> 10 = TEXT 10 { typolink { parameter.field = uid returnLast = url } wrap = <loc>|</loc> } 20 = TEXT 20 { field = SYS_LASTCHANGED strftime = %Y-%m-%dT%H:%M:%SZ wrap = <lastmod>|</lastmod> } 30 = TEXT 30.value = <priority>1.0</priority><changefreq>weekly</changefreq> if.isFalse.field = shortcut } } } } 2 < .1 2.NO.stdWrap.cObject.30.value = <priority>0.9</priority><changefreq>weekly</changefreq> 3 < .1 3.NO.stdWrap.cObject.30.value = <priority>0.8</priority><changefreq>monthly</changefreq> 4 < .1 4.NO.stdWrap.cObject.30.value = <priority>0.7</priority><changefreq>monthly</changefreq> 5 < .1 5.NO.stdWrap.cObject.30.value = <priority>0.6</priority><changefreq>monthly</changefreq> 6 < .1 6.NO.stdWrap.cObject.30.value = <priority>0.5</priority><changefreq>monthly</changefreq> 7 < .6 8 < .6 9 < .6 10 < .6 } } }