chaitra nagaraj microsoft asp.net mvp @spaces.live.com building search engine friendly websites with...
TRANSCRIPT
Interoperabi l i ty with Microsoft Technologies
Chaitra NagarajMicrosoft ASP.NET MVPhttp://[email protected]
Building search engine friendly websites with ASP.NET 4.0
Interoperabi l i ty with Microsoft Technologies
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.
Interoperabi l i ty with Microsoft Technologies
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 way http://www.taget.com/brand/addidas - good way• 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
Interoperabi l i ty with Microsoft Technologies
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
Interoperabi l i ty with Microsoft Technologies
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
Interoperabi l i ty with Microsoft Technologies
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
Interoperabi l i ty with Microsoft Technologies
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 <head runat="server"> <title>Programming meta tags in ASP.NET 4.0</title> <meta name="keywords" content="ASP.NET, ASP.NET 4.0, SEO,
meta" /> <meta name="description" content= "How to use Page.MetaKeywords
and Page.MetaDescription in ASP.NET" /></head>
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";
} }
Interoperabi l i ty with Microsoft Technologies
- 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);} }
Interoperabi l i ty with Microsoft Technologies
- 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="<%$RouteUrl:RouteName=Department, Name=IT%>" Text="Dept IT" />• RouteValueExpressionBuilder.• RouteValueParameter <asp:SqlDataSource id=“sqlDataSource1” runat=“server” ..> <selectparameters> <asp:routeparameter name="Department" RouteKey="Name" /></selectparameters>
Interoperabi l i ty with Microsoft Technologies
ASP.NET routing with Sitemap support<?xml version="1.0" encoding="utf-8" ?><siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" > <siteMapNode url="~/" title="Home" description="Home"> <siteMapNode url="~/Search" title="Search" description="Search" /> <siteMapNode url="~/Details" title="Details" description="Details" /> </siteMapNode></siteMap>
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 ); }}
Interoperabi l i ty with Microsoft Technologies
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);}
Interoperabi l i ty with Microsoft Technologies
Free SEO Toolkit from Microsoft
Local Government Goals for Free SEO ToolkitOptimize site for Increase Web site citizen traffic and usageDetermine how your web pages are displayed on third-party web sitesHelp keep search engine results freshDecrease telephone calls and emails to ask for information that is not easily found on Web siteGood ROI on your Web investmentsFree SEO Toolkit InstallationRequires Microsoft Web Platform Installer
Interoperabi l i ty with Microsoft Technologies
Interoperabi l i ty with Microsoft Technologies
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
Interoperabi l i ty with Microsoft Technologies
Free SEO Toolkit Sitemap Tool
Can be customized to index your site and be made available to search enginesGood for dynamic pages that change frequentlyLets Google/Yahoo!/Bing know how often your content changes so that it can be reindexed in a more timely mannerXML format allows metadata insertionCan be set to run on a daily, weekly, monthly or yearly schedule
Interoperabi l i ty with Microsoft Technologies
Interoperabi l i ty with Microsoft Technologies
Interoperabi l i ty with Microsoft Technologies
ReferencesSEO 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://www.4guysfromrolla.com/articles/012710-1.aspx
SEO Toolkit:
http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx
Interoperabi l i ty with Microsoft Technologies
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!