Question

I am currently trying to create my own sitemapprovider. A aspx (ashx?) file that will dynamically create the sitemap file on request.. no static sitemap file. Everything is read from the database.

Why? I have multiple accounts on the same subdomain (with wildcards), and the sitemap file is different for each user. The sitemap file is only used for google and other search engines.

user1.domain.com
user2.domain.com
user3.domain.com
...
user1000.domain.com

all these subdomain share the same files. And if I create a "/web.sitemap" then all share the same sitemap but thats not correct. Beacause all users create their own pages on their homepage. so they need different sitemaps.

So. I want my sitemap to be reachable for all search engines. And I think that the right way is to register the sitemap in web.config. Right? Or is there another way to do it?

the file now is: sitemap.aspx, or sitemap.ashx. (I am not finished)

How do i register my sitemap so all search engines can find it?

Thanks!

Was it helpful?

Solution

I present my code to create a dynamic sitemap in the article Dynamic Sitemaps in ASP.NET.

You can either use URL routing to refer to your dynamic sitemap as sitemap.xml, or you could simply submit the real name of your sitemap page to Google and Bing.

But I had a little trouble understanding exactly what you want to do. What do you need the web.config to do exactly? And how would the Google crawler vary this based on user?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top