XM Cloud Basics - Troubleshooting Robots, Redirect and Dictionary
Ever Faced below Issues:
- Published a redirect, yet it is not getting reflected on Live Site(Edge)?
- Published robots update, yet it is not getting reflected on Live Site(Edge)?
- Published a dictionary, yet it is not getting reflected on Live Site(Edge)?
Step 1:
Check whether your updates for Robots/Redirects/Dictionary are available at Edge.
Robots, Redirects, Dictionary, Sitemap, Routes, Hostname and more, all of these are part of SiteData Object that can be verified by the Docs tab available in the right pane of the GraphQL Playground:
Run below Query on Edge Playground to check whether updates are available at Edge.
{
site {
allSiteInfo {
results {
name
hostname
robots
redirects{
redirectType
pattern
target
}
dictionary(language:"en",first:200){
results{
key
value
}
}
}
}
}
}Bonus query to include Sitemap, ErrorHandling Pages and Routes:
{
site {
allSiteInfo {
results {
name
hostname
robots
redirects{
redirectType
pattern
target
}
dictionary(language:"en",first:200){
results{
key
value
}
}
sitemap
errorHandling(language:"en"){
serverErrorPage{name}
serverErrorPagePath
notFoundPage{name}
notFoundPagePath
}
routes(first: 100, language: "en") {
results {
routePath
route {
id
}
}
}
}
}
}
}Step 2:
Make Sure the Hostname field for your site is not empty in sitecore. Ideally, it should have the url of your Rendering host (URL of your Vercel/Netlify hosted site). Hostname field can be found at below item:
/sitecore/content/YourTenant/YourSite/Settings/Site Grouping/YourSite
Publish this item after making appropriate update. Publish Robots/Redirects/Dictionary update and run the above graphql query to validate it at Edge.
Step 3:
If the update is still not available at Edge, Republish the Headless Site Item as single Item.
If you are using Publishing V1, please make sure that workflow is implemented for your site to avoid unintentional publishes.
All updates should now reflect on Edge.
Facing same issue with Sitemap ? - I'll be posting how to troubleshoot sitemap in future post.