5,667,575 members and growing! (15,470 online)
Email Password   helpLost your password?
Web Development » ASP.NET » General     Beginner

10 SEO tips for your ASP.NET website

By hartertobak

10 tips for search engine optimization (seo) for your ASP.NET website
Windows, .NET, Visual Studio, ASP.NET, WebForms, IIS 6, IIS, Dev

Posted: 9 Oct 2007
Updated: 9 Oct 2007
Views: 14,937
Bookmarked: 39 times
Announcements
Loading...



Search    
Advanced Search
Sitemap
15 votes for this Article.
Popularity: 4.67 Rating: 3.97 out of 5
3 votes, 20.0%
1
0 votes, 0.0%
2
1 vote, 6.7%
3
1 vote, 6.7%
4
10 votes, 66.7%
5
Note: This is an unedited contribution. If this article is inappropriate, needs attention or copies someone else's work without reference then please Report This Article

Introduction

10 Tips on SEO for your ASP.NET website. I´m sorry, that some of the screenshots contain german language, but I hope you´ll get my point despite that :)

1. Avoid duplicate content

A mistake made very (VERY) often: when you register an url an point it to your webserver, you´re using the "www"-subdomain in most cases. "www" is nothing else than a subdomain. Follow these instructions to get rid of duplicate content:

Imagine you´re the owner of the domain "example.com" - now you´re configuring your webserver using the IIS MMC and create a new Website:

Screenshot - 01_seo.jpg

First info we need is the description:

Screenshot - 02_seo.jpg

then we need the hostheader information:

Screenshot - 03_seo.jpg

Well: in the screenshot above you can see the very important thing:

the hostheader for the configured website is "www.example.com"

After you´ve finished the configuration you can type "http://www.example.com" in your browser and everything runs fine. Now type "http://example.com" and ....jepp, the webserver answers as well.

For search engines this is a major problem - which url is the main url? When content get published, which url is the url on where the information was published first? For google and other search engines "www.example.com" and "example.com" are two different urls.

Avoid that by configuring a permanent redirect:

Create a second website on your webserver

Screenshot - 04_seo.jpg

use "example.com" - your url name without "www" - as hostheader

Screenshot - 07_seo.jpg

and configure it as a permanent redirect:

Screenshot - 06_seo.jpg

This way, "http://example.com" redirects to "http://www.example.com".

Well now some of you will think, that a javascript redirect or a flash redirect will do the same, or even something like

Response.Redirect("http://www.example.com");

but - this is not true. The webserver will answer above shown redirects with a "HTTP/1.x 301 Moved Permanently" response. So the search engine get´s the info, that this ressource has permanently moved. This way, all ranking-power, link-power, etc moves to "http://www.example.com" which is a major factor for the ranking of your website.

2. Avoid duplicate content , part II

Well, when requesting "http://www.example.com" your webserver will deliver a certain page - by default it´s the "Default.aspx". Many Websites, codeproject.com as well, are redirecting and linking (internally) a wrong way: open a browser and type "http://codeproject.com" - you´ll get redirected to "http://www.codeproject.com/index.asp" - "index.asp" seems to be the default-site for the domain www.codeproject.com - but redirecting to it from the "http://codeproject.com" or linking to it within any page of the www.codeproject.com-website is just a big mistake.

No matter how big the influence in your sites ranking is, google´s PageRank is still a ranking factor. So while www.codeproject.com has a PR of 7, www.codeproject.com/index.asp has a PR of 5 - while these two pages deliver the same content. This is bad, has very bad influence in codeproject´s ranking, beause two URLs deliver the same content. Google doesn´t know, that "index.asp" is the root-site of codeproject, so google tries to evaluated (through algorythms) which site is the more important one. But the major problem in here is, that all the link-power, ranking-power, etc get´s devided - cp could rank a lot better without having the "index.asp" in the search engines index.

To make sure, that your site´s ranking reaches the maximum, you should concentrate on one URL - make sure, even in internal linkbuilding (links to the "Home"-Page of your website), to link to your domainname: www.yourdomain.com instead of www.yourdomain.com/default.aspx

3. Choose individual, god <title>s

Very easy to achive, big influence on your site´s ranking: don´t use static titles. The <title>-Tag is one of the best way to optimize a site for a special topic or keyword. Don´t use a dozen of keywords in the title tag, because you´re "paying in" for each and every keyword - "paying in" means, that the weight of your site get´s devided for all the keywords mentioned in the title-tag. Choose one or two keywords, or a keyword-combination to achieve a god relevance and a good ranking.

While working with Masterpages there is an easy way to do so:

//assuming, that your <head runat="server" id="myHead"> 

if (Request.CurrentExecutionFilePath.Contains("example.aspx"))
{
    HtmlTitle title = new HtmlTitle();
    title.Text = "Example";
    myHead.Controls.Add(title);
} 

So - if you have 3 sites, the Homepage, the AboutMe-Page and the Contact-Page you should give these three pages individual, useful titles. The less keywords you use, the better the influence for these Keywords will be. Same is for <meta name="keywords" and <meta name="description", but the title-tag has the biggest influence nowadays.

4. Clean up your source code

Something hard to believe but still true: clean up your source code and try to minimize the code as much as possible. Follow these rules:

  • don´t use inline css, use external stylesheets whenever possible
  • don´t use inline javascript, use external .js-files instead
  • don´t leave html-comments
  • don´t use massive line-breaking (twenty lines with only a linebreak or something similar)
  • don´t use viewstate, when not necessary
  • don´t use a <form runat="server> when not necessary (comes with hidden fields)

The better the relation between content (==text) and (html/css/javascript)code is, the better you´re ranking will be. The smaller the source code, the better this relation will be.

5. Make your site crawlable

Don´t:

  • don´t use Flash/Silverlight to show information.
  • don´t use Flash/Silverlight for menues
  • don´t use javascript-based menues
  • don´t use button-based menues
  • don´t use intro-pages

Do:

  • do use a sitemap (CP-Article:Simple Sitemaps in ASP.NET)
  • do use simple <a href> tags whenever possible
  • do use the "title" property for <a href>
  • do use the "alt" property for images
  • do use rss (syndicate all your content, when possible)
  • do use pings for search engines (use http://pingomatic.com/)

6. Use <strong>, <h1>, <h2>, <h3>

Use the html markups <strong>, <h1>...<h6> regulary - use them to structure the sites content. These markups are made for weighting some words more than others - so it is for search engines. Use these markups, whenever it´s useful to do so.

7. Validate your source code

Use the wonderful html-validator on http://validator.w3.org to validate your site. If it´s valid, there will be no punishment for a "bad technical solution" - use the validator to find problems, get rid of them and find a better ranking instead.

8. Get to know your users

I don´t know about you, but I´m building websites for users in the first place. So my intention is to get to know, how I can achieve more interessts for my site. The first thing is to find my audience - the better my ranking is, the more visitors I will have. So I´m using keyword-tools to find good keywords and keyword-combinations to find the keywords I need to optimize for (because that´s the keywords potential visitors will use):

  • Overture: http://inventory.overture.com/
  • Google external Keyword-Tool: https://adwords.google.com/select/KeywordToolExternal

Find the good keywords, look at your competitors and start optimizing.

9. Keyword density

Keyword density is very important for a sites ranking for a special keyword. Imagine you have a site about "free source code" - well, you should definatly try to mention this keyword combination as often as you can - as long as it makes sense, of course. Try to reach a keyword density bigger than 3.5 - so mention "free source code" 3.5 times per 100 words.

10. Get linked!

Links to your site have the biggest influence to your sites´ ranking at all. Try to get linked from as many other webistes as possible. Use social bookmarking and other social services like digg.com to get more links and more visitors. Example: digg.com-integration of this article:
Digg!


11. Use "speaking" urls

Use www.urlrewriting.net for speaking urls. The more keywords you´ll get in your urls, the better the ranking could be

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

hartertobak



Location: Germany Germany

Other popular ASP.NET articles:

Article Top
Sign Up to vote for this article
You must Sign In to use this message board.
FAQ FAQ Noise ToleranceSearch Search Messages 
 Layout  Per page   
 Msgs 1 to 9 of 9 (Total in Forum: 9) (Refresh)FirstPrevNext
QuestionC# Code example for links to del.ic.iousmemberthetallguy17:53 26 May '08  
GeneralRedirection and query-stringsmemberRichard Deeming5:56 22 Oct '07  
Generalnice guidememberBrent Lamborn17:57 9 Oct '07  
GeneralThanks. Here are some of my thoughts [modified]memberMichael Sync17:52 9 Oct '07  
GeneralRe: Thanks. Here are some of my thoughtsmemberhartertobak0:29 10 Oct '07  
GeneralRe: Thanks. Here are some of my thoughtsmemberMichael Sync0:49 10 Oct '07  
GeneralRe: Thanks. Here are some of my thoughtsmemberhartertobak2:41 10 Oct '07  
GeneralRe: Thanks. Here are some of my thoughtsmemberhartertobak2:44 10 Oct '07  
GeneralThanks for this excellent articlemembertonyvuolo7:02 9 Oct '07  

General General    News News    Question Question    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

PermaLink | Privacy | Terms of Use
Last Updated: 9 Oct 2007
Editor:
Copyright 2007 by hartertobak
Everything else Copyright © CodeProject, 1999-2008
Web10 | Advertise on the Code Project