Build a custom sitemap with Xano?
![Brandon Hassler](https://us.v-cdn.net/6037124/user_avatars/4585463.jpg)
My Bubble website uses Xano to populate all of it's product pages. So for example the URLs look like the following:
domain.com/product/565
domain.com/product/985
domain.com/product/1183
domain.com/product/89
When the page is loaded on Bubble, it knows to make an API call to Xano looking for the ID in the URL (So /product/565 will search Xano for ID #565 and return the product data).
The issue is that Bubble does not know what product ID's exist and therefore cannot display them in my sitemap. It only can list domain.com/product/. So I'm losing out on a lot of low-hanging search traffic.
The solution (I think) is to build an API endpoint on Xano that essentially grabs all of the ID's on my product table and then formats it all into a custom sitemap-friendly format that then spits out a sitemap.xml file for me to download and upload to Google Search Console.
To avoid reinventing the wheel, has anybody done this before? Is there a better method for this?
Best Answer
-
Hi Brandon,
I recorded this loom video showing you how you can go about that.
This is what you're using then setting the HTTP header
Content-Disposition: attachment;filename="sitemap.xml"
Let me know if that points you in the right direction.
Answers
-
This is awesome @Louis Machado - CSA! Thanks so much for putting this together!
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback