2 years ago
#61666
Dasha
Use Sitemap generated at Back End in Nuxt (Vue) application
I am using Nuxt Robots for the dynamic creation of robots.txt file for different environments.
This is my robots config:
robots: {
UserAgent: '*',
Allow: '/',
Sitemap: `${process.env.SITE_URL}sitemap.xml`
},
But, Sitemap is generated by Back End, and I need to refer to it.
Code: ${process.env.SITE_URL}sitemap.xml
Example of link to Sitemap file for staging environment: https://www.staging1.my-project/sitemap.xml
And I need to refer to it, and make this functionality work, because now when I am opening https://www.staging1.my-project/sitemap.xml in my browser, the browser thinks that this is the route of my application, and my app shows 404 page (because there are no such page)
How could I fix it, and see Sitemap generated by Back End, when I am opening
.../sitemap.xml
?
vue.js
nuxt.js
sitemap
robots.txt
xml-sitemap
0 Answers
Your Answer