0

We are using DXA 1.7 and created a sitemap page. When I deploy the page it deploys to broker database. I need to drop the generated sitemap.xml file to the root location of my project. What are the options I have? Please suggest.

3

If you create the page in the root SG, the sitemap.xml will be available in your rootURL/sitemap.xml. The crawler should be able to browse the site to pick it up, without any modifications or customization.

If for some reason, you need the file to be physically available on the root on the project (on the filesystem), you have a few options.

  • Use a combination of symlinks (to the root of the website) and replication software (to copy to other servers) to copy the file to the filesystem upon publishing, based on XML extension.
  • Create a controller to download the file from the broker and store it in the application root. It needs to be protected with proper security. You can call the controller during post-publish (deployer extension or event system)
  • Statically include the file in the root of your project, if it does not change frequently.
  • You can also publish the file as a binary and ask your crawler to look up the BinaryData/tcmid/ folder instead of the website root.

Hope it helps!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.