Search code examples
asp.netsearch-engine

how to get search engines to understand a DB driven asp.net site


All,

This would seem like a fairly basic asp.net question - but in all my years of coding, I've never really thought about it.

Say you have a asp.net 2.0 site with only a masterpage and a default.aspx and its a blog that saves all the data into the database. Links on the side are generated automatically. So ... the URL is always just http://www.XXXXX.com/default.aspx.

So, with that being the case, what do you need to do so that ... say google ... knows about all the different blog entries and links directly to the entries instead of just the base URL?

Is it as simple as changing the forms method to: method="get"?

Thanks, L. Lee Saunders


Solution

  • There are at least two solutions:

    1. Search engines understand query strings, so just add the article IDs to the URLs in your anchor tags -- no need to even use a form control.
    2. Use URL rewriting to expose one set of URLs to the outside world (like /article-title/1234/) in your anchor tags, and then modify the URL to be default.aspx when it arrives at your site; the page could then pull the article to be displayed from any number of places, including but not limited to a query string.