-
Do you know how Google ranks pages?
What makes Google so successful? The answer to that is Google's Page Rank Algorithm.
You can read about the early days of the page rank algorithm here: The Anatomy of a Large-Scale
Hypertextual Web Search Engine.
The actual Page Rank algorithm looks like this: PR(U) = (1-d) + d * sumV(PR(V)/N(V)).
Here PR = Page Rank, U is the page we're looking at, d is a constant damping
factor and V is a page that links to our page.
The basic premise that comes from this algorithm is:
When I link to your page, I'm casting a vote that your page is good and the more
links (votes) that are received the better the page is.
This statement alone sent shockwaves through the webmaster community and sent many
webmasters on an endless quest for links. All pages begin with an equal page rank,
which is then moved around based on the internal and external links to and from
that page.
It's important not to forget that Page Rank is not the only factor involved in a
search. Essentially Google completes the following steps when you perform a search:
- Finds all pages matching the keywords of the search
- Rank accordingly using "on the page" factors (proximity between words, frequency,
repetition etc.)
- Calculate the relevancy of
inbound anchor text
- Uses the page rank to decide what order to display the results in
So looking for people to link to your site will only become important if you've
got the first three discriminating factors nailed.
-
Do you know if Google has indexed your page?
Hot Tip!

Figure: Use the Google Toolbar to check your pages in Google cache
First things first, you should check if your web page has been indexed by Google.
Don't be surprised if Google is already one step ahead of you - its Googlebots could
have already crawled your site without you knowing. So what's the best way to find
out if Google has indexed your web page? Use the Google toolbar.
When one of Google's spiders indexes your site, it takes a snap shot of what each
page looks like and stores it in its cache.
Note: The default settings of the Google Toolbar do NOT include this very useful
button. To turn it on, you have to press Options on the toolbar, go to the "More"
tab, and check the "Page Info menu" option.
Hot Tip: "How can I know which pages in my website are not indexed by Google?"
We have a solution - see
SSW Link Auditor Google PageRank Report and then clean up all the red cross
in the report and your Google coverage will be maximized.
-
Do you know your Page Rank?
The first step to increase your Google ranking is to know what you're current Page
Rank is, that way you can keep track of whether your changes are working.
The only way to find out the page rank of a page is to download the Google toolbar.
Page Rank is actually a measure of how likely it is that your page will be found
relative to all others during a random search. Google calculates this as an integer
between 1 and 2 million. This scale is then mapped to give the page rank of between
1 and 10. This means that it's not entirely accurate. Imagine that your website
has a 'real' page rank of 1,000,000, and one of your competitors' page has a page
rank of 1,000,001. All other things being equal, he will beat you, although both
page ranks will show up as the same when scored out of 10.
-

- Figure: The page rank of the Sydney .NET User Group
is 5
-
Do you create more page rank for yourself?
Creating more pages is the only way to create page rank from nothing, as every page
on your site starts its life with the same base page rank as did every other page
on the web. It follows from this that having more pages is better, and having excessively
long pages is a waste - you would end up with more page rank to distribute if you
split it into two pages instead. Three other ways of increasing page rank are using
automatic directories like DMOZ, by writing Blogs, and
by having other websites with good page rank link to you.
-
Do you conserve your page rank?
Links cannot create page rank for you, but they can certainly move it around, including
moving it to pages on other people's websites. Be aware: the Google algorithm looks
at pages not domains, so there is nothing to stop your valuable page rank being
distributed around the web. The reciprocal is true also, you 'bleed' page
rank from the pages that link to you. If these links are coming from another
domain then that's probably good, but if the extra page rank is coming at the expense
of other pages on your site, it may be bad. So you see that page rank bleed makes
it vital how you handle your external links, as each one can lower the page rank
of your page. There is a way to link to pages without bleeding rank. You do this
by putting the 'nofollow' attribute in your link. This looks like this: <a href=home.html
rel=nofollow>Some Text</a>. It is probably a good idea to make all your
external links nofollow, thus conserving your page rank within your site. Another
possible method is to display external links as text instead of a hyperlinks.
-
-
Figure: Bad example of conserving PageRank
-
-
Figure: Good example of conserving PageRank
For more information about this topic see post
Linking out: Often it's just applying common sense on the Google webmaster
central blog.
-
Do you concentrate your page rank where it will do the most good?
Given that you have a certain amount of page rank to work with, the challenge becomes
to decide which pages on your site are the most important, and distribute your page
rank to these pages so that they turn up in search results. A simple rule to follow
here is to have lots of links to and not many links from your important pages.
-

- Figure:
The main page gets a 4.5 page rank from the 3 internal pages linking to it with
1.5 page rank.
-
How many inbound links do you have?
Now that you have page rank sorted, it's time to concentrate on the other important
things to worry about. Who's linking to me is an important question, and one that
can be easily answered. To find out how many inbound links you have and where they're
coming from, go to www.Google.com and type in "link:" then the URL of your page.
Click this link and
see who is linking to SSW
-

- Figure: The backward links for SSW is 71
A limitation to the "link" functionality on Google is that it doesn't
list all of the links that Google knows about; it only lists those that contribute
over a certain level of Page Rank. In other words if you're getting a link from
a webpage with thousands of links on it you're probably not gaining much Page Rank
from them if any at all. And there's a good chance that it won't be shown using
the link to functionality on Google. See our
distribution rule for details on how Page Rank is split and distributed
amongst webpages.
Odds are you'll notice that a majority of links that are coming to that page are
from your own website. This highlights the notion that Page Rank is calculated on
a page by page basis. Websites don't accumulate Page Rank, webpages do.
-
Do you use enough keywords?
If you're sick to death of begging people for reciprocal links a quick and easy
fix is to make sure you have enough of the right keywords on your page. As a general
rule of thumb we try to get all the great keywords in the first few paragraphs of
every page so that spiders can't miss it.
Let's use this page as an example. Before I wrote this page I sat down and thought
about some keywords people would use if looking for some Google tips and tricks
on how to increase your rankings. The words I used for the URL were chosen with
search engine optimization in mind and here are a few more of my keywords I hoped
to rank well with:
- Increase Google Friendliness
- Better/Increase Google Ranking
- Page Rank
- Search Engine Optimization (Note: In Australia we spell optimization with an "s"
[optimisation] but I'm willing to bet that most people searching online would use
the American way of spelling it. So I had to take this into consideration)
This page is testimony to the fact that keywords and content are the keys to better
Google rankings. You can find all of the above mentioned words several times
in the first couple of paragraphs and this is why my page ranks really well. See
for yourself: try this search, or this one and even this one Notice the extraordinary rankings for
the keywords. You can even try the same thing in Yahoo and we still rank very
well. As you can see we're on the first page simply because strategic choice and
placement of keywords.
-

- Figure: Notice the abundance of keywords in the
first few paragraphs
-
Do you monitor the progress of your keywords?
Every month when the Googlebots start reindexing your website looking for new content
and keywords, it's a good idea to keep track of how your Google rankings are going.
At SSW we use Web
CEO to check our Google Rankings. Web CEO checks the search engine results
for our keywords on a schedule, allowing us to continually monitor our Google rankings.
We've listed some of our product related keywords that we care about on our
Google Keywords page. By clicking on any of the links on our keywords column
it shows you what the search engine results pages are for those keywords.
-
Are your <title>, <h1>, and <h2> tags descriptive?
The <title>, <h1>, and <h2> tags need to be descriptive. They
should briefly describe the purpose or content of the page. Have a look at the following
two images. The first image is a bad example as the title bar and page heading are
not very descriptive. The second image is a better example as title bar and page
heading are more informative.
-

- Figure:
Bad Example - a non-descriptive <h1>
-

- Figure:
Good Example - a descriptive <h1>
Technical Information
The following code segment shows the areas that should be changed. The code in green is the text that should be changed to
something more descriptive. It should give the reader a good idea of the page content
or the section it is describing.
<!DOCTYPE HTML PUBLIC"-//W3C//DTD
HTML 4.0 Transitional//EN">
<html> <head>
<title>About Us</title>
<meta
content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
<link
href="http://www.ssw.com.au/ssw/Include/ssw.css"
type= "text/css" rel="stylesheet">
<link
href= "http://www.ssw.com.au/ssw/Images/icoSsw.ico" rel= "shortcut icon">
</head>
<h1>About Us</h1>
We have a program called SSW Code Auditor to check
for this rule.
We have a program called SSW Link Auditor to check
for this rule.
-
Do you use META keywords and description tags?
One of the easiest ways to get the ball rolling with your web pages and being
noticed by search engines is to use META tags. Search engines use META tags to categorise
your website's content. Many webmasters took this as an opportunity to abuse the
META tags and the earlier less sophisticated search engines found that the quality
of search results were suffering. Luckily today's search engines like Google don't
give the META tags so much weight when determining search engine results pages.
In any case we know that search engines do consider them so we think it would be
silly to overlook such a quick and easy task to complete.
There are two kinds of META tags you should use:
META-Description tag: Search engines will often use the information
in the META Description tag as well as the Title to describe your site in the short
description that goes along with the link in your search engine rankings.
Meta-KEYWORDS tag: The META keywords hold words that you can use
to help search engines classify your content. The keywords you use must be relevant
and must appear in the body text.
Trying starting with 3 to 5 'key' words from your Title. Where possible combine
the words into logical phrases and we recommend using all lower case letters (and
NO LEADING SPACES) when specifying keywords!
We have a program called SSW Code
Auditor to check for this rule.
NOTE: what you really want is a report that lists every single page on your website
and their relative page rank so that you can ensure that no unimportant pages are
receiving a high page rank.
-
Do you use "301" code instead of META tags to
redirect renamed or moved pages?
Don't lose your Google juice when you rename a file. Do not use META refresh to
redirect pages - "301" code is the most efficient and Search Engine Friendly method
for webpage redirection. There are different ways to implement and it should preserve
your search engine rankings for that particular page. If you have to change file
names or move pages around, always use the code "301", which is interpreted as "moved
permanently".
-
Is your URL consistently the same case?
The URL text behind your domain URL (i.e. after the .com or .com.au) should be spelt
using a consistent case (upper or lower). We know that Google is case sensitive
when it comes to URLs and treats webpages with the URL "www.ssw.com.au/ssw/" as
different to "www.ssw.com.au/SSW/". This has some pretty big implications
on making sure people link to you in a consistent manner.
At SSW we use SSW Link Auditor
to check that all of our URLs display consistently.
Here's an example to illustrate this point. Here's all the pages linking to "www.ssw.com.au/ssw/"
and then all the pages linking to "www.ssw.com.au/SSW/". As we can see Google is
thinking that these two pages are different, also assigning both pages a different
Page Rank when they are actually the same page. Please note whilst Google is case
sensitive when it comes to URLs it isn't when it comes to the keywords you put into
the search box. i.e. a search for "UPSIZING PRO" and "upsizing pro"
will still return the same results.
In SSW we recommend following naming conventions:
|
1. The root should in lower case, e.g. "www.ssw.com.au/ssw/".
|
|
2. If there is only 1 word, it's not necessary to have the 1st char to be upper
case, e.g. index, images.
|
|
3. Otherwise, use Initial Caps on each word, e.g. /ProductDetails/CategoryListing.aspx
|
|
4. Follow the proper noun naming convention, such as SQL, SSW eXtremeEmails, SSW
TimePRONET.
|
-
Do you use Juicy Words in your URLs?
Regardless of the format (uppercase/lowercase) of your URL, you should always include your main keywords in the URL. So when you create the page URL remove all the filler words and just keep the main keywords.
-
http://northwind.com/how-do-i-find-the-version-of-the-word-document.html
-
Figure: Bad example – The filler words remain
-
http://northwind.com/word-document-version.html
-
Figure: Good example – The filler words removed and only Juicy words remain
-
-
Figure: As an example the URL for this would be http://rules.ssw.com.au/SoftwareDevelopment/RulesToBetterSharePoint/Pages/SharePointWordVersion.aspx
-
-
Figure: Good example – Only using Juicy keywords in your URL helps with SEO and the Google ranking of the page.
-
Do your links have relevancy to the page you're linking
to?
We know that the way your inbound links are worded do make a difference, they play
a crucial factor when Google searches are made by search engine users. Google uses
the words between your <a href> tags to decide which websites are the most
relevant to the search terms.
For example if we had a million inbound links that described SSW like this:
<a href="http://www.ssw.com.au">Movies for Free</a>
When someone searches for free movies on Google, Google would point to us.
So what does this mean? All those that are pointing to pages on your website that
are displayed as 'More', 'Link', 'This' or 'Click Here' aren't doing you any favours
when it comes to increasing your Google rankings.
- "For tips and tricks to increase your Google Ranking Click
here"
-
Figure: Bad Example #1 - Link does not increase your rankings
- "For tips and tricks to increase your Google Ranking
Click Here"
-
Figure: Bad Example #2 - Link does not increase your rankings
- "Link for
tips and tricks to increase your Google Ranking"
-
Figure: Bad Example #3 - Link does not increase your rankings
- "For tips and tricks to increase your Google Ranking read
this"
-
Figure: Bad Example #4 - Link does not increase your rankings
- "For tips and tricks to increase your Google Ranking
Click Here"
-
Figure: Bad Example #5 - better than the ones above (scroll and hold over link to
see the difference)
-
-
Figure: Bad Example #6 - Link does not increase your rankings
- "For tips and tricks to increase your Google Rankings go to our
Rules to Better Google
Rankings"
-
Figure: Good Example
This rule also has relevance for easier website
navigation.
We have a program called SSW Code Auditor to check
for this rule.
We have a program called SSW Link Auditor to check
for this rule.
-
Do you make your data-driven pages easier to find?
Google crawls data-driven websites. There are a few considerations when it comes
to optimizing a data-driven website. The best way to get your database driven website
crawled by Google is to have an index of your dynamic pages so that the Googlebots
have a singular point of reference to your dynamic pages. It's a slow process, but
it will be well worth it.
Take a look at how we tackle this issue. We have a knowledge base with hundreds
of pages and we list them all here on our
kbindex page. We know that Google has crawled our kbindex page because it
shows up on the Google
cache, which means that all of our articles will be indexed. We've also
applied this same principle with our site map.
-

- Figure: It is hard for search engines to know which
option from the drop down field they should go into. Here we add a link to our Knowledge
Base Index.
-

- Figure: By default the dynamic pages behind this page would
be invisible to google. You need to provide a link that will make them visible to
google.
-
Do you add the image + the text of the error message
for SEO?
This is one of the most common errors tech bloggers do. I don't know why most bloggers
do not think (or remember) to add more than just the image of the error screen capture.
So if you add the text of the error message it will help others when they search,
and help their Google juice.
Let's look at 3 examples...
-

-
Figure: Bad Example - this image gives no context of the surrounding areas, and
without the text as well you get no google love
-

-
Figure: OK Example - this image is great because it gives context by including the
surrounding area, but you still need the text for SEO benefits
-
Microsoft SharePoint Designer
User-defined workflows have been disabled by the SharePoint Administrator. User defined workflows will be unable to run.
-
Figure: Good example - if you add the image and this text above, you get full
marks
-
Do your inbound picture links use attributes?
What do you do when you want images to link to your site? In the case of images
Google will look for the alt text and factor this into the search results. So when
you ask someone else to link to your site with an image you should always add attributes
like "alt" and "title" into the code. Here's an example. Hold
the cursor over the image below and see what happens.
-

<a href="/ssw/Default.aspx">
<img src="/ssw/Images/SSWLogo/SSWLogo_NoText_NoShadow.gif" width="169" height="132">
</a>
-
Figure: BAD EXAMPLE (scroll over - you will see nothing)
-
![SSW Logo [Search engines will index this text] SSW Logo [Search engines will index this text]](/ssw/Images/SSWLogo/SSWLogo_NoText_NoShadow.gif)
<a href="/ssw/Default.aspx">
<img src="/ssw/Images/SSWLogo/SSWLogo_NoText_NoShadow.gif"
alt="SSW Logo [Search engines will index this text]"
title="SSW Logo [Search engines will index this text]" width="169" height="132">
</a>
-
Figure: GOOD EXAMPLE (scroll over)
See how this image
is indexed by Google
For images that aren't a link consider
using <dl> tag for captions. This way google will index your image
more accurately.
We have a program called SSW Code Auditor to check
for this rule.
-
Do you avoid the temptation of link farms?
There are many search engine optimization techniques that are quick and easy fixes,
like being in a link farm. To join a link farm people pay to be part of a collection
of webpages where their sole purpose is to provide interconnecting links and harvest
Page Rank amongst members. Many of these "get ranked quick" methods have
some serious repercussions. If you are caught in a link farm, or have hidden text
in your pages, you'll eventually get caught and sentenced with the Google "death
penalty". So after all is said and done a safe and sure fire way to increase
your website's Page Rank is to provide useful information that other websites will
want to link to. Google's ideal of the Internet is that it should be filled with
webpages that have high quality information and based on this ideal it rewards high
quality content and penalises crud.
Many of these link farms and websites that subscribe to them have been identified
and banned by Google so you should never be lured into the temptation of quick easy
solution to search engine optimization. Employing dodgy optimization techniques
is a gamble; you're gambling that the smart people over at Google aren't as smart
as you.
-
Are you listed with DMOZ.org?
-
The DMOZ Open Directory Project is the largest, most comprehensive
human-edited directory of the Web. It is constructed and maintained by a vast, global
community of volunteer editors. Its primary objective is to organize a small portion
of the web and present it back to the rest of the population, culling out the bad
and useless and keeping only the best content.
-
Figure: What DMOZ Project is
This tip for improving your ranking does not work anymore. It was a very 5 years
ago tip :-)
Many webmasters have written articles proclaiming that being listed with DMOZ.org
and Yahoo automatically gets you an artificially high Page Rank. They think this
because DMOZ and Yahoo use Google technologies. This may not be entirely correct.
What we do know is that the data that DMOZ collects is used by hundreds of sites.
With many of these sites linking to you, the Page Rank benefits are probably too
weak to be listed in a link search, but we know that the Googlebots do crawl them,
and the links do count. So what you get is heaps of lightly weighted links coming
from sites that you may not be aware of adding to your Page Rank. All things considered,
it's free to list with DMOZ and you might as well take the 10 minutes to fill out
the form. Here's a link to
DMOZ
-
Do you avoid using frames on your website?
Websites that use frames often don't get crawled by search engine spiders. The web
was designed in such a way that every URL is supposed to correspond to a webpage,
and with framed websites this is not the case. We recommend that you avoid frames
altogether.
However, there is a solution for those that have already taken the plunge. You can
use Meta Tags in your code, but considering that some search engines don't rely
on these, you also need to use the no frames tag in your code. Many webmasters use
those tags to leave messages for people that don't have frames enabled, however
this is the only part of the site the search engines will be able to search. So
we recommend a summary of your site and its purpose with a link back to home on
every page of your site. Here's a link to some code that you may use.
-
Does your flash website have an alternate HTML site?
Whilst the use of Flash is becoming increasingly common as companies seek more visually
enticing websites, the truth is that Flash remains invisible to most search engines.
The solution to this is to have a HTML option available with the same content as
the Flash site. This also helps with users that don't have Flash installed or don't
want to wait for long periods of time for the page to load up.
-
Do you use include files for your JavaScript?
Many websites use JavaScript for fancy menus, drop downs or scroll overs. Many search
engines don't recognise JavaScript and even for those that do, if the web spiders
are spending most of their time sifting through JavaScript instead of content, you
risk your content not being indexed at all. At SSW we use include files in all of
our pages. This keeps the code clean and helps search engines index pages.
-
Do you submit all your software to download sites?
As suggested a great way to increase your websites search engine rankings is to
get inbound links towards your website. Being a software vendor we do this by submitting
our products to freeware/shareware download sites like Shareware River and Tucows.
So if you find a site that accepts software submissions make sure you submit your
entire product range, not just one.
-
Are your webpages less than 101k?
As a general rule of thumb we think that it's a good idea to keep your websites down
to 101k in size. As well as the premise that more smaller pages will give you more
page rank that fewer longer pages, the Google cache never goes higher than 101k.
The Google cache is a snapshot of what the webpage looked like the last time the
Googlebots crawled your site. Click the link to take a look at this page's Google cache. The snapshot may not be the same as how it
looks now simply because that's how it looked the last time the Googlebots were
in town.
We have a program called SSW Link
Auditor to check for this rule. We offer a
rule sample page for demo scan.
-
Do you use your Robots.txt file effectively?
If you decide to you use the
redirect method when linking to external pages from your site, it's a good
idea to have a robots.txt file in your root directory. In the robots.txt
file you specify that the robot (or spider as they're sometimes known) should not
look in the redirects folder. This will avoid the problem that can sometimes occur
where put a Google search will sometimes incorrectly display content from another
site as if it was from your site. Also, this avoids incorrect hits on your redirects,
mucking up your statistics which is one of the main reasons you would use redirects
in the first place!
-
Do you redirect pages correctly to make your
website search engine friendly?
You don't want to give your websites Google ranking away to the redirect page when
it can all go to the destination page. To avoid this, as well as make sure the spider
can follow the redirect, you should:
- Have the correct redirecting code
-
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Redirect("/about.aspx", true);
}
</script>
-
Figure: Bad Example
-
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.RedirectPermanent("/about.aspx", true);
}
</script>
-
Figure: Good Example
ASP.NET 4 introduced a new method called Response.RedirectPermanent, use that for
redirecting permanently
For examples of correct redirecting code in other languages visit ASP.NET 4.0 SEO features: Response.RedirectPermanent()
- Check that your page redirect is search engine friendly with the Search Engine Friendly Redirect Checker
-
-
Figure: SSW's homepage redirect is Search Engine friendly.
-
Do you keep under the Google File Size Limit?
File Type and Size When the
search appliance successfully fetches a document, it determines the size and type
of the file. If the file is:
- Larger than 30MB, it is discarded and not indexed.
- HTML, the search appliance indexes up to 2.5MB of the document, caches it, and discards
the rest.
- A non-HTML format, the search appliance:
- Downloads the non-HTML file.
- Converts the non-HTML file to HTML.
- If the converted content is less than 4,000,000 bytes, indexes the first 2MB of
the HTML file. (Take note that 4MB=4,194,304 bytes.) If the converted content exceeds
4,000,000 bytes, the document is not indexed. However, the document and a link to
it do appear in search results.
- Caches the first 2MB of the HTML file.
- Discards the rest of the HTML file and the non-HTML file.
-
Do you know to register your domain for a long time?
If you own a domain and want Google to instantly recognize it as a permanent domain
then register the maximum (10 years for .com) you can in one go. Google will assume
it is permanent and rate you higher sooner.
-
-
Figure: Good example, domain was registered for 10 years
-
Did you know that all pilots around the world must speak English? Back then the
decision of what language to use, was made as English, since the US invented the
first plane. Like the sky, in the web world, it is better to use one version of
English. Since the US invented the web, let's go with that.
If you are an Australian or British this rule is controversial, but it is worth
it for the following reasons:
- Cater for the majority. Most web traffic is from American users and they expect
American (most probably will assume it is an error)
- On the practical side, more web searches are going to be returned for US spelling
of words.
-

-
Figure: Click "Set Language" to verify you are using US English.
-

-
Figure: Bad Example - US is not the default selected
-

-
Figure: Good example - US is the selected language
'Don't forget
after making edits to check your pages for spelling errors.'
-
Do you have a Google Places entry?
With Google's
increased emphasis on local search and
promoting local services, it is important that companies have a
Google Places entry (previously referred to as Google Local Business
Center) so that their businesses can be found easily in searches. Click here to
Add your business.
Having a Google Places entry will allow their entries to display when users search
for services in a local area e.g. 'sydney .net consultants'.
-
- Figure: Good example - Google Places lets SSW rank highly in local search
-
Do you know the IIS things to do?
There are a number of things you can do to make your content more search friendly in IIS.
- Make content search engine-friendly
- Improve volume and quality of traffic
- Control how search engines access and display Web content
- Inform search engines about locations that are available for indexing
- Show broken pages
You can use the IIS SEO Toolkit to find most of your problems.
-
- Figure: Analysing your site is easy
-
- Figure: Bad example - You never know how many problems you have until you try
See ScottGu's post on IIS Search Engine Optimization Toolkit for more information
-
Do you know to fix your ugly URL's?
Ugly URL's not only make it difficult for Users to browse your site they can also impact your google rankings.
e.g.
http://www.northwind.com/MyInternalDB/UserDatabase/ProductList.aspx?productname=Access
Figure: If you have a nasty URL like this
You should fix it up to look more like this:
e.g.
http://www.northwind.com/products/access
Figure: Wow, I bet your user could even guess the URL for "Word"
- Add in Global.asax a route
protected void Application_Start(object sender, EventArgs e)
{
//RouteTable and PageRouteHandler are in System.Web.Routing
RouteTable.Routes.Add("ProductRoute", new Route("products/{productname}", new PageRouteHandler("~/MyInternalDB/UserDatabase/ProductList.aspx.aspx")));
}
Figure: OK example ?create a static route if you only have a few rewrites
- Use the URL Rewriting Module for IIS7
-
- Figure: Good example - An IIS7 Rewrite is much easier to manage
-
Do you know to always create 301 redirects?
If you are moving or deleting a page you should always setup a 301 redirect so that you keep you Google juice, otherwise you will be starting from the beginning.
In order to achieve this you will need to log all 404's to a database.
- Add code to Global.asax to log 404s to a database (OLD_URL, NEW_URL)
- Maintain the NEW_URL field
- Change Global.asax to:
- Look up the 404 in the database
- If you find a broken link do a permanent redirect to the new URL
- Otherwise insert broken link
- Do a temporary redirect to a temporary no found page
There are many tools that you can use to detect 404's:
- Google Webmaster tools (preferred)
-
- Figure: You can download a list of all the 404's to populate your database
- Bing Webmaster center,
-
- Figure: Bing has a nicer UI, but would not let me in
- ELMAH,
-
- Figure: As all the errors are logged together you will need to query for just 404's
- IIS SEO toolkit
-
- Figure: The SEO Toolkit will give you a comprehensive report
-
Do you know how to redirect?
Any time you move a page or just delete a page you should add a 301 Redirect to a new page or a page for missing pages.
- You can add a 301 redirect in code
Response.PermanentRedirect("~/MyNewPage.aspx")
Although this works well it is difficult to manage the list of redirects and you need to keep the page around.
- You can write an HTTP handler
This is better as you can choose where to store the redirect list, but you still need to manage a custom codebase.
- You can write an add-on for IIS URL Rewriter (Recommended)
-
- Figure:The IIS URL Provider provides three providers out of the box
This is the best option as there is no code to manage. All you have to manage is the mapping data.
See Using Custom Rewrite Providers with URL Rewrite Module for an explanation of how to use each of the providers