{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":42650,"path":"platform-user-interface/sitemap-generator/generate-xml-sitemaps-seo-indexing.md","title":"Generate XML sitemaps for SEO indexing","bundle":null,"doc_type":null,"release":"australia","body":"\n# Generate XML sitemaps for SEO indexing\n\nCreate XML sitemaps for web crawlers to index your public portal pages and improve search engine optimization for your portals.\n\n## Before you begin\n\nAdd SEO information to portal pages, such as meta tags that improve the searchability of Service Portal pages. For more information, see [Improving search engine optimization for portals](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/service-portal/seo-sp.md).\n\nReview the \"Sitemap requirements\" section of the [Sitemap Generator](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/sitemap-generator/sitemap-generator.md) documentation topic to determine what content should be in the sitemap.\n\nRole required: admin\n\n## Procedure\n\n1.  Navigate to **All** &gt; **Sitemap Generator** &gt; **Sitemap Configuration**.\n\n2.  In the UX Sitemap Configurations \\[sys\\_ux\\_seo\\_sitemap\\_config\\] table, select **New**.\n\n3.  On the form, fill in the fields.\n\n    |Field|Description|\n    |-----|-----------|\n    |Sitemap Name|A unique name for the sitemap.|\n    |Description|A description of the sitemap contents.|\n    |Active|Option for whether the sitemap is automatically generated.|\n\n4.  From the form context menu, select **Save**.\n\n5.  From the **Sitemap Config Definition** tab, select **New**.\n\n    **Important:**\n\n    -   You must ensure that the contents of your sitemap meet the [Sitemap requirements](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/sitemap-generator/sitemap-generator.md).\n    -   You don’t need to add the header and footer of the sitemap XML. These are added automatically when the sitemap is generated.\n6.  In the **Type** field of the UX Sitemap Definition form, select one of the following options to define the contents of the sitemap either with a script or by specifying static URL elements.\n\n<table id=\"choicetable_fff_fps_gtb\"><thead><tr><th align=\"left\" id=\"d127487e211\">\n\nType\n\n</th><th align=\"left\" id=\"d127487e214\">\n\nAction\n\n</th></tr></thead><tbody><tr><td id=\"d127487e220\">\n\n**Script**\n\n</td><td>\n\nDynamically generate the content from a script.\n\n **Note:** If special characters such as &lt;,&gt;, &amp;, or \" are included in URLs, you must replace them with their equivalent escape characters.\n\n</td></tr><tr><td id=\"d127487e235\">\n\n**Static**\n\n</td><td>\n\nSpecify the static URL elements to include in the sitemap.\n\n -   **loc**\n\nThe full page URL.\n\n-   **lastmod**\n\nThe date the page was last modified.\n\n-   **changefreq**\n\nThe approximate frequency at which the page is updated.\n\n For more information about valid values for these elements, see the [Sitemaps XML format](https://www.sitemaps.org/protocol.html) topic on the sitemaps.org website.\n\n</td></tr></tbody>\n</table>7.  Select **Active** and then select **Submit**.\n\n8.  Repeat steps [5](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/sitemap-generator/generate-xml-sitemaps-seo-indexing.md) through [7](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/sitemap-generator/generate-xml-sitemaps-seo-indexing.md) to define additional content to include in the sitemap.\n\n    You can create multiple sitemap definitions with any combination of types that combine to create the sitemap. For example, you could include both static XML and dynamic content from a script or you could include content from multiple scripts.\n\n9.  Configure the number of URL elements to include per sitemap page to control how many pages are in your sitemap.\n\n    By default, 750 URLs are included per sitemap page. For URLs with **hreflang** tags, you should limit the number of URLs per page to the default value of 750 URLs.\n\n    1.  Enter `sys_properties.list` in the navigation filter.\n\n    2.  Open the **glide.sitemap.page.count** property and set the value to the number of URLs to include per page.\n\n        The maximum value is 5,000.\n\n    3.  Select **Update**.\n\n10. From the UX Sitemap Configuration record, select **Generate Sitemap**.\n\n    If a sitemap includes more than the number of URL elements specified with the **glide.sitemap.page.count** system property, a sitemap index file that specifies the URLs of the sitemap pages is generated. The sitemap index file naming structure is `sitemap-<sitemap-config-sysid>.xml` and the sitemap page naming structure is `sitemap-<page>-<sitemap-config-sysid>.xml`.\n\n11. Select **Copy Sitemap URL** and add the sitemap URL in Google Search Console or to your `robots.txt` file with the Google Custom Search integration.\n\n    **Note:** This URL accesses the latest sitemap or, if the sitemap is paginated, the latest sitemap index. It doesn’t execute scripts on the fly to regenerate the sitemap.\n\n    For information about using Google Search Console, see [Manage your sitemaps using the Sitemaps report](https://support.google.com/webmasters/answer/7451001) in the Google documentation. For information about the Google Custom Search integration, see ServiceNow provided integrations.\n\n12. Review any portals URLs that were excluded from the sitemap because they aren't publicly accessible.\n\n    1.  Navigate to **All** &gt; **System Logs** &gt; **System Log** &gt; **Application Logs**.\n\n    2.  In the condition builder, enter the filter **\\[App Scope\\] \\[is\\] \\[Sitemap Generator\\] AND \\[Message\\] \\[starts with\\] \\[The given URL\\]**.\n\n        The **Message** field includes the excluded URLs. For example, \"The given URL `https://<instance>/kb?id=kb_article_view` is not public\".\n\n\n## Result\n\nAll active sitemaps automatically regenerate once a day and include content from any of their active sitemap definitions. Previous versions of the sitemap are deleted. You can check the status of the daily job at **All** &gt; **System Logs** &gt; **System Log** &gt; **Application Logs** using the filter **\\[App Scope\\] \\[is\\] \\[Sitemap Generator\\]**.\n\n**Parent Topic:**[Sitemap Generator](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/platform-user-interface/sitemap-generator/sitemap-generator.md)\n\n"}}