Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chaitra Nagaraj Microsoft ASP.NET MVP Building search engine friendly websites with ASP.NET 4.0.

Similar presentations


Presentation on theme: "Chaitra Nagaraj Microsoft ASP.NET MVP Building search engine friendly websites with ASP.NET 4.0."— Presentation transcript:

1 Chaitra Nagaraj Microsoft ASP.NET MVP http://chaitranagaraj@spaces.live.com Building search engine friendly websites with ASP.NET 4.0

2 What is Search Engine Friendly? Search Engine Friendly The term "search engine friendly" may be used to describe website designs, menus, content management systems, images, videos, shopping carts, and other elements that have been optimized for the purpose of search engine exposure. Search Engine Optimization(SEO) A definition: The modification of a web site’s build, content, and inbound linking to better position the site in the natural/un-paid results of major search engines.

3 Best practices for good URLs Describe your content Keep it short Static is the Way Descriptive are better than numbers http://www.taget.com/114/cat223/ - bad wayhttp://www.taget.com/114/cat223/ http://www.taget.com/brand/addidas - good wayhttp://www.taget.com/brand/addidas Keywords Never Hurt Sub domains not the Answer: siteexplorer.search.yahoo.com Fewer Folders Hyphens separate best: Use – followed by _,+ Eg: /brands/dolce-and-gabbana/ Stick with Conventions Don't be Case Sensitive Don't append extraneous data

4 What affects ranking? 1. On-Page Keyword specific ranking factors: - Keyword use anywhere in the title tag - Keyword use as the first word in the title tag - Keyword use the root domain name 2. On-Page Non Keyword factors: - Existense of substansive, unique content on the page - Freshness of page creation - Use of links on the page that point to other URLs on this domain - Existense of meta description tags

5 3. Other positive Ranking factors: - Keyword focused Anchor text from External links - External link popularity - Diversity of Link sources - Trustworthiness of the domain 4. Negative factors - Cloaking with malacious content - Link acquisition from link brokers/sellers - Link from pages to web spam sites - Cloaking by user agents - Frequent server downtime and inaccessibility

6 Guidelines for search friendly URLS Create Unique, accurate page titles Make use of the "description" meta tag Improve the structure of your URLs Provide one version of a URL to reach a document Create a simple directory structure Make your site easier to navigate Create a Sitemap for your site Have a useful 404 page. Offer quality content and services Optimize the use of images Make effective use of robots.txt Be aware of rel=“nofollow” for links

7 Search friendly Url using ASP.NET 4.0 Use of HTML code snippets in VS 2010 Use of DOCTYPE element Descriptive HTML - Descriptive Title and Metadata Programming meta tags in ASP.NET 4.0 protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Page.Title = "Programming meta tags in ASP.NET 4.0"; Page.MetaKeywords = "ASP.NET 4.0, meta, SEO, keywords"; Page.MetaDescription = "How to use Page.Keywords and Page.Description in ASP.NET"; }

8 - Cont’d Canonical URLs : RedirectPermanent method void Application_BeginRequest(object sender, EventArgs e) { HttpApplication app = sender as HttpApplication; if (app != null) { string domain = "www.odetocode.com"; string host = app.Request.Url.Host.ToLower(); string path = app.Request.Url.PathAndQuery; if (!String.Equals(host, domain)) { Uri newURL = new Uri(app.Request.Url.Scheme + "://" + domain + path); app.Context.Response.RedirectPermanent( newURL.ToString(), endResponse: true); }

9 -Cont’d : Descriptive URL : Using ASP.NET routing - Routing is a new feature of asp.net 4.0 Components of Routing RouteTable Routing Rules MapPageRoute used instead of PageRouteHandler RouteURLExpressionBuilder <asp:HyperLink ID="HyperLinkIT" runat="server" NavigateUrl=" " Text="Dept IT" /> RouteValueExpressionBuilder. RouteValueParameter

10 ASP.NET routing with Sitemap support private SiteMapNode SiteMap_SiteMapResolve( object sender, SiteMapResolveEventArgs e ) { var routable = e.Context.CurrentHandler as IRoutablePage; if ( routable != null ) { var rc = routable.Routing.RequestContext; var route = rc.RouteData.Route; var segments = route.GetVirtualPath( rc, null ).VirtualPath.Split( '/' ); var path = "~/" + string.Join( "/", segments.Take( segments.Length - rc.RouteData.Values.Count ).ToArray() ); return SiteMap.Provider.FindSiteMapNodeFromKey( path ); }

11 ASP.NET MVC based Routing for Search Friendly URLs routes.MapRoute( "ViewProduct", "products/{id}/{productName}", new { controller = "Product", action = "Detail", id = "", productName = "" } ); Route route = new Route(url, new MvcRouteHandler()){};..... routes.Add(name, route); and in your ProductController class... public ActionResult Detail(int? id, string productName) { Product product = IProductRepository.Fetch(id); return View(product); }

12 Free SEO Toolkit from Microsoft Local Government Goals for Free SEO Toolkit Optimize site for Increase Web site citizen traffic and usage Determine how your web pages are displayed on third-party web sites Help keep search engine results fresh Decrease telephone calls and emails to ask for information that is not easily found on Web site Good ROI on your Web investments Free SEO Toolkit Installation Requires Microsoft Web Platform Installer

13

14 Analyzing Free SEO Toolkit Reports Free SEO Tool identifies pages that are branded; for example, sets of pages named “MRSC -Page Title” should be renamed “Page Title - MRSC“ since search engines put more weight on words at the beginning of page titles than words at the end of page titles Finds broken and redirected links and shows what pages link to them; useful for domain changes and other major site re-organizations Finds HTML errors, missing ALT tags, protocols used, improper syntax and pages that are too large Many other categories of reports

15 Free SEO Toolkit Sitemap Tool Can be customized to index your site and be made available to search engines Good for dynamic pages that change frequently Lets Google/Yahoo!/Bing know how often your content changes so that it can be reindexed in a more timely manner XML format allows metadata insertion Can be set to run on a daily, weekly, monthly or yearly schedule

16

17

18 References SEO friendly URL’s http://www.seomoz.org/blog/11-best-practices-for-urls http://www.4guysfromrolla.com/articles/012710-1.aspx ASP.NET 4.0 Routing: http://chriscavanagh.wordpress.com/2009/05/19/asp-net-webform- routing-with-sitemaps / http://chriscavanagh.wordpress.com/2009/05/19/asp-net-webform- routing-with-sitemaps / http://www.4guysfromrolla.com/articles/012710-1.aspx SEO Toolkit: http://weblogs.asp.net/scottgu/archive/2009/06/03/ iis-search-engine-optimization-toolkit.aspx

19 Feedback / QnA Your Feedback is Important! Please take a few moments to fill out our online feedback form Use the Question Manager on LiveMeeting to ask your questions now!


Download ppt "Chaitra Nagaraj Microsoft ASP.NET MVP Building search engine friendly websites with ASP.NET 4.0."

Similar presentations


Ads by Google