Adding sitemap.xml to Plasmic hosted site

What are you trying to do? (please be as specific as possible and include relevant screenshots, code snippets, and reproduction steps)
I want to add a sitemap.xml to my site so that it is crawled for SEO.

What have you tried so far? (please link relevant docs and other forum posts)
I’ve created a sitemap.xml file and placed it into the public folder of my repo, then issued a pull request from Plasmic Studio, then Published to the CDN.



But I’m still getting a 404 on /sitemap.xml

Relevant links:

Hello @ali_mahvan, I see 2 issues here:

  1. In your “Publish to Plasmic Hosting” screenshot, it looks like the deployment didn’t succeed — it shows “Failed to deploy”. Let’s address that first. One possible cause could be the use of sessionStorage in places like the dynamic expression for the Light Mode variant on the Article page. Since sessionStorage is only available in the browser, it can cause issues in environments like Next.js that use server-side rendering.

  2. I believe Plasmic Hosting isn’t aware of the assets you add to the public folder in your repository. For example, if you regenerate the Plasmic project with codegen, the sitemap.xml won’t appear in the public folder. To use custom assets like that, you’d need to set up a custom deployment directly from your repository.

The failed deployment for non www is normal, and I resolved that issue on another project by adding an A record with the correct IP address to the domain DNS. It took a week or so for it to actually work, and I expect the same here.

As for the the SEO issue, to clarify, you’re saying that there’s no way to include a sitemap when using Plasmic for hosting? :eyes:

Nice work on fixing the DNS issue.

As for the sitemap, unfortunately there isn’t. For more information, check this forum post.