chaitra nagaraj microsoft asp.net mvp @spaces.live.com building search engine friendly websites with...

19
Interoperability with Microsoft Technologies Chaitra Nagaraj Microsoft ASP.NET MVP http://[email protected] Building search engine friendly websites with ASP.NET 4.0

Upload: naomi-alexander

Post on 28-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

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

Interoperabi l i ty with Microsoft Technologies

Chaitra NagarajMicrosoft ASP.NET MVPhttp://[email protected]

Building search engine friendly websites with ASP.NET 4.0

Page 2: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com 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.

Page 3: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 4: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 5: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 6: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 7: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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";

} }

Page 8: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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);} }

Page 9: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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>

Page 10: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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 ); }}

Page 11: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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);}

Page 12: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 13: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

Interoperabi l i ty with Microsoft Technologies

Page 14: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 15: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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

Page 16: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

Interoperabi l i ty with Microsoft Technologies

Page 17: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

Interoperabi l i ty with Microsoft Technologies

Page 19: Chaitra Nagaraj Microsoft ASP.NET MVP @spaces.live.com Building search engine friendly websites with ASP.NET 4.0

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!