How to save a sitemap.xml in ServiceNow

Brenda Williams
Tera Contributor

Does anyone know how to properly build and save a sitemap in ServiceNow. We have a URL that redirects to an API call but Google Search Console returns the url with an error that sitemap is HTML. Not sure how to correct this-anyone have any experience?

8 REPLIES 8

Community Alums
Not applicable

You will most likely need the Plugin Google Custom Search Integration.

https://docs.servicenow.com/bundle/newyork-platform-administration/page/administer/search-administra...

Once you have that installed you should be able to do things like make a site map and make a robots file.

 

Please mark correct if this solves your issue and helpful 👍 if it has assisted you.

Brenda Williams
Tera Contributor

We have the plugin but this doesn't solve the issue of needing to be able to store the sitemap at the root. Has anyone been able to do that?

Community Alums
Not applicable

Please try Justins response from this thread:

https://community.servicenow.com/community?id=community_blog&sys_id=efed222ddbd0dbc01dcaf3231f9619f8

"We did this using a scoped app which generates a sitemap from our KB artciles table. We then had to put the URL to the scoped app API in robots.txt file using the Google plugin. It was pretty straight forward, we used a scripted REST API set the return to XML (had to set in the script) and put together an XML from a glide record query."

 

I imagine broadly the steps would be:

1. install plugin

2. modify robots.txt file to point to a sites.xml page, or scripted rest api as above

 

We've done that but still get the error message that sitemap is not xml format because we can't put it at the root. I would think others would be getting this same error from google.