25
Architecting Navigation

04 Architecting Navigation

  • View
    5.469

  • Download
    1

Embed Size (px)

DESCRIPTION

How to architect a web site and its links for search engine crawlability, usability, and accessibility

Citation preview

Page 1: 04   Architecting Navigation

Architecting Navigation

Page 2: 04   Architecting Navigation

Classing up your URLshttp://store1.com/product.aspx?id=MB147L&SessionId=2344&RegionCode=en-US&format=rich&cat=3

http://store2.com/mp3_players/Apple_ipod_nano_16_G2_Black/

http://store3.com/mp3-players/Apple-ipod-nano-16-G2-Black/

• store3.com•mp3•Players• apple

• ipod•nano• 16• G2

• Black

• store2.com• mp3_players• Apple_ipod_nano_16_G2_Black

• store1.com• product.aspx• id=MB147L• SessionId=2344

•RegionCode=en-US• format=rich• cat=3

Page 3: 04   Architecting Navigation

Crawler Sign Posts

• 200 OK

W3 standard for HTTP Status Codes

• 301 Moved Permanently

• 302 Moved Temporarily

• 304 Not Modified

• 404 Gone

Page 4: 04   Architecting Navigation

Bonus Crawling Tip!

Page 5: 04   Architecting Navigation

What is the difference?

• oreilly.com• oreilly.com/index.csp• www.oreilly.com• www.oreilly.com/index.csp

What’s the difference?

Page 6: 04   Architecting Navigation

Canonicalization in action

Canonical Form # Sites Linking In

oreilly.com 25,030

oreilly.com/index.csp 0

www.oreilly.com 1,174,124

www.oreilly.com/index.csp 0

Check your site’s canonical forms using: Yahoo’s Site Explorer

Page 7: 04   Architecting Navigation

Canonicalization Recommendation

1) Chose www vs. non-www, 301 redirect one to the other

Detailed article on the issue from Matt Cutts

www.mysite.com mysite.com

2) Trim your folder-level default filename off the endmysite.com/default.aspx mysite.com

3) Make all internal links to the correct canonical form

4) Use Google Webmaster Tools to select www vs non-www.

Page 8: 04   Architecting Navigation

Example: Consistent Linking

Page 9: 04   Architecting Navigation

Case Study – Vans.com

Page 10: 04   Architecting Navigation

Can we find them?

Page 11: 04   Architecting Navigation

What they want to be found for

skate shoes bmx shoes

Google 122 89

Yahoo 18 131

Live Search 13 29

Page 12: 04   Architecting Navigation

Titles

May I please have: http://vans.com May I please have: http://vans.com

Page 13: 04   Architecting Navigation

Descriptions

http://developer.yahoo.com/yui/

Page 14: 04   Architecting Navigation

Advanced Topics (There’s more!)

• URL parameters• Tracking referrers and visitors• State management• Geographic location of content• Rearchitecting link structure• Content submission protocols

Page 15: 04   Architecting Navigation

Implementation Tips

Page 16: 04   Architecting Navigation

ASP.Net

• URL Rewriting in ASP.Net– Implementation whitepaper– Work around for 404 error pages

• Implementing Redirects in ASP.Net

• Implementing Redirects in IIS

• ASP.Net URL session state management

Page 17: 04   Architecting Navigation

Asp.Net Custom Error Pages

HTTP/1.x 302 FoundLocation: http://www.globalscholar.com/Error.aspxGET /Error.aspxHTTP/1.1Host: www.globalscholar.com

Detailed article on the issue from Colin Cochrane

Page 18: 04   Architecting Navigation

ASP.Net 301 Redirects

<script>

protected void Page_Load(object sender, EventArgs e) {    Response.Status = "301 Moved Permanently" ;    Response.AddHeader("Location", "http://mysite.com/new-URL"); }

</script>

Include in any *.aspx file… (you don’t need a code behind file)

Page 19: 04   Architecting Navigation

Other Redirects

• PHP

<?php// Permanent redirectionheader("HTTP/1.1 301 Moved Permanently");header("Location: http://www.domain.com/");exit();?>

• Cold Fusion

<CFHEADER statuscode="301" statustext="Moved Permanently”><CFHEADER name="Location" value="http://www.domain.com/">

• JSP<%response.setStatus(301);response.setHeader( "Location", "http://www.new-url.com/" );response.setHeader( "Connection", "close" );%>

• Perl#! /usr/bin/perluse cgi;my $q = cgi->new();print $q->redirect(-location => 'http://www.newsite.com/newpage.cgi’,-status => 301,);

Page 20: 04   Architecting Navigation

ASP.Net Canonicalization

protected void Application_BeginRequest(Object sender, EventArgs e) {

if (HttpContext.Current.Request.Url.ToString().ToLower().Contains(     "http://www.mysite.com")) {     HttpContext.Current.Response.Status = "301 Moved Permanently";     HttpContext.Current.Response.AddHeader("Location",         Request.Url.ToString().ToLower().Replace(             "http://www.mysite.com",             "http://mysite.com")); }

}

Create in your Global.asax file….

More information and examples: http://search.live.com/results.aspx?q=301+redirect+asp.net

Page 21: 04   Architecting Navigation

IIS 301 Redirects

Click here for a whitepaper

Page 22: 04   Architecting Navigation

Apache Redirects

Use .htaccess file for bulk operations:

• Moving a single page

Redirect 301 /oldpage.html http://www.example.com/newpage.html

• Moving a site (and redirecting everything to the home page)

Redirect 301 / http://www.example.com

• Changing file extension

RedirectMatch 301 (.*)\.html$ http://www.example.com$1.php

Page 23: 04   Architecting Navigation

Apache Canonicalization

Use .htaccess for bulk operations:

• Non-www to www (need mod_rewrite enabled)

Options +FollowSymlinksRewriteEngine onrewritecond%{http_host} ^domain.com [nc]rewriterule^(.*)$ http://www.domain.com/$1 [r=301,nc]]

• Index page to root domain

Options +FollowSymLinksRewriteEngine on# index.php to /RewriteCond%{THE_REQUEST} ^[A-Z]{3, 9}\ /.*index\.php\ HTTP/RewriteRule^(.*)index\.php$ /$1 [R=301,L]

Page 24: 04   Architecting Navigation

Questions?

Page 25: 04   Architecting Navigation

Where to next?

http://janeandrobot.com http://ninebyblue.com

http://webmaster.live.com http://google.com/webmaster http://siteexplorer.search.yahoo.com

http://SearchDeveloperDay.com