ASP.NET Coding with SEO in mind.

ASP.NET websites need Search Engine Optimization too!

I found that there is not much information available on the Net about how to optimize your ASP.NET pages so that they may be found on Google.

Here are a few tips:

  1.  Use the System.Web.UI.HtmlControls.HtmlMeta class for meta headers. Initialize, set the value and add to page.header.controls.

protected void Page_Load(object sender, EventArgs e)
{
CreateMetaTags();
}

private void CreateMetaTags()
{

System.Web.UI.HtmlControls.HtmlMeta
metaAuthor = new HtmlMeta(),
metaCopy = new HtmlMeta(),
metaDate = new HtmlMeta(),
metaBots = new HtmlMeta(),
metaKeywords = new HtmlMeta(),
metaDesc = new HtmlMeta(),
metaName = new HtmlMeta(),
metaGen = new HtmlMeta();


metaAuthor.Name = "Author";// Author
metaAuthor.Content = "Deep J."; metaCopy.Name = "Copyright";// Copyright
metaCopy.Content = "Copyright " + DateTime.Now.Year.ToString() + " Noble River Ventures"
metaDate.Name = "Date";// Date
metaDate.Content = DateTime.Now.ToString("MM/dd/yyyy hh:mm:ss");
metaBots.Name = "robots";// Robots
metaBots.Content = "all";
metaDesc.Name = "Description"; // Description
metaDesc.Content = " Keyword Research Explained . Free Search Engine Optimization
Information. Tips, Tricks, Tools, Blogs, Articles. Updated every day. You need to go nowhere
else for your SEO updates... ";

metaKeywords.Name = "Keywords";// Keywords
metaKeywords.Content = "Search Engine Optimization Tools | ASP.NET Coding | SEO | Search Engine Optimization | Programming ";

this.Page.Header.Controls.Add(metaAuthor);
this.Page.Header.Controls.Add(metaCopy); this.Page.Header.Controls.Add(metaDate);
this.Page.Header.Controls.Add(metaBots);
this.Page.Header.Controls.Add(metaDesc);
this.Page.Header.Controls.Add(metaKeywords);


this.Title = "Search Engine Optimization Tools, Tips, Tricks, Articles and Blogs.";
}
}


 
  1. Use  this.Title = “Title here”;
  2. For Anchor tags, use this format <a runat=”server” href = “~/Folder/FileName.aspx”>link text </a> . The runat=”server” part is most important or else, maintaining your link integrity is a headache.
  3. If you use SessionIds, try not to do that via the querystring. If on separate tries, the spider sees different URLs, it may take them as different pages.  Of course, later on it may flag all those other pages as duplicate, but your bandwidth is wasted unnecessarily.
  4. Put your links on the Master page so that the same links are available from every page.  Add additional links to your important pages from the body copy.
  5. Postbacks are not very good for SEO.  If you are displaying content only on the click of a button or some other user action, the content may not be available to the spider.
  6. Avoid the use of hyperlinkbuttons.  They include javascript code instead of actual links that may or may not be read by the spider. Use regular anchor tags as in point 3 above.
  7. Do not put the link to the copyright notice(or web-designer email) on the Master Page. It gets copied on every content page and takes away from the ranking of other links. If you must, make sure the spider does not follow it by using rel=”nofollow”.
  8. Viewstate. This is a problem if you are trying to optimize pages with a lot of dataentry objects like text boxes and dropdowns. ASP.NET creates a hidden variable and posts it back to the page with a lot of encrypted data that stores the state of the controls on  the page. Spiders may find the keywords way down on the page, and your keyword density may also suffer because of the added viewstate data.  This is not often an issue with regular text only pages.

 

 


If you found this FREE article useful, please help others by sharing it!
Share this article with your friends on Facebook

Comments :

Please let us know if you liked this article. Even if you disliked it too ...
Whatever you do, don't go without leaving a note!

And do follow the house rules:
No punching, kicking or hitting below the belt. Screaming is allowed!
No links to places you don't want your mama to see!

Comment by : pari at 4/20/2010 5:19:03 AM

ITs ok for not html,tags in the comment box
Add your comments here:

Comment
( Sorry, no html tags in the comment box)

Name

Email(not for display )

Website

Enter your comments below.Write answer here.

Subscribe to our FREE Marketing Briefings
1. Pull ahead of your competition with "up-to-date"
Marketing Tips, Tools,
Tricks And Techniques !
2. Download FREE - Marketing Books That Have Made Millions!

First Name: *
Email Address: *

1)You'll receive an email from
Noble River Marketing;
2)Click the Confirmation Link to
get access to Members Area.



Are You Ready To Take Your Business
To The Next Level ?


Click here to Steal The #1 Secret of
The Most Successful Entrepreneurs
 


Articles on Marketing
Full List of Articles
 
Material Connection Disclosure
You should assume that the owner of this website has an affiliate relationship and/or another material connection to the providers of goods and services mentioned on this website and may be compensated when you purchase from a provider. You should always perform due diligence before buying goods or services from anyone via the Internet or offline!
Privacy Policy .:||:. Write for this Site .:||:. SiteMap
Copyright 2008, 2009, 2010 - All rights reserved.
Deep Janardhanan & Noble River Resources ™
9517 Craigs Mill Dr., Glen Allen,Va - 23060