How to create dynamic google sitemap in asp.net?

1.3k Views Asked by At

I have one website like www.example.com and have dynamic pages like www.example.com/page?1 and www.example.com/page?2 etc. more pages are created every hours. I need to create sitemap.xml file automatically save in server path and update my latest web pages to Google search engine. How to do this in ASP.NET? Give me any clue on this.

1

There are 1 best solutions below

0
On

I was looking for similar information recently, there is a similar topic. What you need is called "web crawler" - the principle of work consists in the searching of all URL-address in the HTML-code, excluding links to other sites, and creating a list of found links. For each of the URL-address in the list it will repeat these steps and as result you'll get list of address for all your web pages.
And then you can build file Sitemap.xml, I have used for this the class of .net Framework - XmlTextWriter.
What about automatically updating the Sitemap file , I think you can set some timer and to update the file, for example, once a day or do it yourself every day. Good luck