{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":47751,"path":"servicenow-platform/knowledge-management/seo-knowledge.md","title":"SEO for canonical URLs and localized versions of knowledge articles","bundle":null,"doc_type":null,"release":"australia","body":"\n# SEO for canonical URLs and localized versions of knowledge articles\n\nImprove the searchability of knowledge articles by adding tags for canonical URLs and **hreflang** tags for translated knowledge articles.\n\nYou can add the default tags for canonical URLs and **hreflang** tags by selecting the **Use SEO script** check box on the Knowledge Article View \\[kb\\_article\\_view\\] page record. For more information, see [Enable SEO for canonical URLs and localized versions of a portal page](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/seo-sp.md).\n\nWhen the **Use SEO script** option is selected:\n\n-   The canonical URLs for a knowledge article are added to the knowledge article view page.\n\n    Example canonical URL: `https://<instance name>.servicenow-com/csp?id=kb_article_view&sysparm_article=<article number>`\n\n-   The **hreflang** tags for the translated versions of a knowledge article are added to the knowledge article view page.\n\n    Example URL with an **hreflang** tag: `<link rel=“alternate” href=“https://<instance name>.servicenow-com/csp/fr?id=kb_article_view&sysparm_article=<article number>” hreflang=“fr”`/&gt;\n\n    **Note:** A self-referencing **hreflang** URL is also added for the language of current knowledge article.\n\n    For example, an English knowledge article is viewed by visiting a URL with the following format:\n\n    `https://<instance name>.servicenow-com/csp/?id=kb_article_view&sys_kb_id=<sys_id>`\n\n    In addition to the **hreflang** tags added for translations, the English language self-referencing **hreflang** tag is added:\n\n    `<link rel=“alternate” href=“https://<instance name>.servicenow-com/csp/?id=kb_article_view&sys_kb_id=<sys_id>” hreflang=“en”/>`\n\n\n## Script includes for canonical URLs and hreflang tags\n\nBy default, the knowledge article view page uses the SPSEOHeaderTagsArticleViewSNC script include to add the SEO tags for canonical URLs and **hreflang** tags.\n\nThe following table describes the script includes for adding canonical URLs and **hreflang** tags to Service Portal pages, including the knowledge article view page.\n\n<table id=\"table_pl2_qc2_dmb\"><thead><tr><th>\n\nScript include\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nSPSEOHeaderTagsSNC\n\n</td><td>\n\nIncludes the default implementation for the canonical URLs and **hreflang** tags for Service Portal pages. This script include is read-only.\n\n For more information, see [Enable SEO for canonical URLs and localized versions of a portal page](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/platform-user-interface/seo-sp.md).\n\n</td></tr><tr><td>\n\nSPSEOHeaderTags\n\n</td><td>\n\nFacilitates overriding the default implementation in the SPSEOHeaderTagsSNC script include for Service Portal pages. The SPSEOHeaderTags script include extends the  SPSEOHeaderTagsSNC script include.\n\n</td></tr><tr><td>\n\n SPSEOHeaderTagsArticleViewSNC\n\n</td><td>\n\nOverrides the generateHrefLangArray and generateCanonicalURL functions for the knowledge article view page configured in the SPSEOHeaderTags script include. The SPSEOHeaderTagsArticleViewSNC script include is read-only and extends the   SPSEOHeaderTags script include.\n\n</td></tr><tr><td>\n\nSPSEOHeaderTagsArticleView\n\n</td><td>\n\nFacilitates overriding the default implementation in the SPSEOHeaderTagsArticleViewSNC script include for the knowledge article view page.The SPSEOHeaderTagsArticleView extends the  SPSEOHeaderTagsArticleViewSNC script include.\n\n</td></tr></tbody>\n</table>As an administrator, you can add canonical URLs, **hreflang** tags, and any custom headers for knowledge articles by updating the SPSEOHeaderTagsArticleView script include. For more information, see [Configure custom SEO tags for canonical URLs and localized knowledge articles](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/servicenow-platform/knowledge-management/configure-seo-knowledge.md).\n\n"}}