views:

133

answers:

2

Hi,

As I understand it, just URL re-writing is not the only thing one needs to do for making a website SEO friendly. You also needs to maximize the use of div (instead of tables), reduce javascripts, flashes and have a clean HTML.

I need to know how can this be achieved when one used a ASP.Net control. ASP.Net send loads of stuff to the screen which in technologies like PHP can be delivered using much cleaner code.

Can anybody tell me is there a way to force ASP.Net to render cleaner code and work with divs instead of table when one used datagridview.

Also I would appreciate if one can post the suggestions for making a existing website SEO friendly which was coded in ASP.Net C# 2.0

regards

Kalpak

A: 

Server controls have been the main selling point for ASP.NET WebForms. It has allowed developers to quickly put up pages without thinking of HTTP, HTML, CSS, JavaScript, SEO or anything. Exactly this kind of knowledge you will need to consistently create quality markup that is SEO-friendly.

If you absolutely wish to stay with WebForms, you need to look at what output the controls you use render. If you don't like it then you may have to redefine their rendering algorithms or better create your own controls.

Also get some url rewriting module (or use the one included in .NET 3.5 SP1 - the one used by ASP.NET MVC framework) and define good-looking self-describing urls for your existing pages. Also take advantage of header tags (H1...H6), search engines look at them to see what the page says it is about.

I wouldn't worry about divs vs. tables and validation, this is not clear of how relevant this is for the SEO, there are too many widely different opinions on these matters with proofs to support each point of view. What does matter, is the content. As they say, content is the king.

What I would pay attention to is the view state that ASP.NET injects into pages. It is widely known that the close to the beginning of the page the content is, the better for search engines. ASP.NET steals the beginning of a page by putting there an often huge block of serialized view state (under circumstances can reach megabytes). Try to turn off view state for your pages if you can (if your server logic can be adapted to stateless operation). This will be a very important step.

Developer Art
+1  A: 

Making your site's pages "SEO friendly" is really about ensuring that search engines (Google), can understand the content on the on the pages. Using "semantic" html markup can go a long way to help the search engines.

ASP.NET doesn't so much make it hard to do semantic markup as it does make it easy NOT to.

Wrapping a sub-heading in an <h2> tag and styling the <h2> helps the search engine understand that a particular string of text has more weight than other text on the page. ASP.NET makes in easy to fall into the trap of just using a Label server control and applying styling to it to make it look like a heading.

GridView data controls render tables. If you repeating data would be better understood with more semantic markup, consider using a Repeater control or a Listview control if you need to support paging etc.

Step 1 to SEO optimization is understanding semantic markup. Then you can find the appropriate ASP.NET controls to achieve your optimized SEO output.

HectorMac