How implement sitemap api for google in nodejs express
I have a web application which is running with nodejs + express and want to provide an sitemap api for google search console.
As far as I see there are multiple sitemap protocol, but I think I will go with the simple text based format. (See more)
The text file should contain one URL per line. For example:
Additionally fullfil those guidelines for text file sitemaps:
- Encode your file using UTF-8 encoding.
- Your text file should contain nothing but the list of URLs.
- You can name the text file anything you wish, provided it has a .txt extension (for instance, sitemap.txt).