<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>Jay Harris is Cpt. LoadTest - SEO</title>
    <link>http://www.cptloadtest.com/</link>
    <description>a .net developers blog on improving user experience of humans and coders</description>
    <language>en-us</language>
    <copyright>Jason Harris</copyright>
    <lastBuildDate>Thu, 01 Oct 2009 02:33:55 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 2.3.12105.0</generator>
    <managingEditor>jharris@harrisdesigns.com</managingEditor>
    <webMaster>jharris@harrisdesigns.com</webMaster>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=fa601dad-9032-43a8-ba67-195baa859d88</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,fa601dad-9032-43a8-ba67-195baa859d88.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,fa601dad-9032-43a8-ba67-195baa859d88.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=fa601dad-9032-43a8-ba67-195baa859d88</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
If you have read my post on <a title="Blog Post: Misconceptions on JavaScript Plugins and SEO" href="http://www.cptloadtest.com/2009/08/31/Misconceptions-On-JavaScript-Plugins-And-SEO.aspx" target="_blank">Misconceptions
on JavaScript Plugins and SEO</a>, you know that search engines don't do JavaScript.
Though these plugins and libraries (such as one for pulling your latest Twitter Updates)
are nice for adding dynamic content for your users, they are just end-user flare and
add nothing to your SEO rankings. They also put an unnecessary tax on your users,
as each client browser is responsible for independently retrieving the external content;
the time for your page to render is extended by a few seconds as the client must first
download the JS library then make the JSON/AJAX request for your content.
</p>
        <p>
In response to this, I have created <a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank">dasControls</a>,
a library of custom macros for dasBlog (the blogging engine that powers <a href="http://www.cptloadtest.com">www.cptloadtest.com</a>).
I have started with content that is driven by custom JavaScript libraries and convert
the content and data retrieval into server-side controls. For now, dasControls contains
only a Twitter Status macro, but I intend to add more controls in the coming months.
</p>
        <p>
dasControls [Build 1.0.0.0] : <a title="Download dasControls v1.0" href="http://dascontrols.codeplex.com/Release/ProjectReleases.aspx" target="_blank">Download</a> | <a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank">Project
Page</a></p>
        <h3>dasControls TwitterStatus Macro
</h3>
        <p>
The TwitterStatus macro uses server-side retrieval of your Twitter data, eliminating
all client-side JavaScript calls for your tweets. By placing the Twitter request on
the server, the data is also available to any search engines that index your page.
Additionally, data is cached on the server, and new updates are retrieved based on
the polling interval you specify. When using real-time client-side JavaScript calls,
there is a 2-5 second delay for your end-users while the data is retrieved from Twitter;
by caching the data on the local server, this delay is eliminated, and the content
for each user is delivered from the local cache, lightening the load for the end-user
while avoiding an undue burden for high-traffic sites.
</p>
        <p>
          <strong>Macro Name:</strong> TwitterStatus 
<br /><strong>Macro Syntax:</strong> &lt;% TwitterStatus("user name"[, number
of tweets[, polling interval]])|dasControls %&gt;
</p>
        <ul>
          <li>
            <strong>User Name</strong> : String. Your Twitter handle. 
</li>
          <li>
            <strong>Number of Tweets</strong> : Integer. The number of tweets to retrieve and
display. [default: 10] 
</li>
          <li>
            <strong>Polling Interval </strong>: Integer. The number of minutes between each Twitter
retrieval. [default: 5] 
</li>
        </ul>
        <p>
          <strong>Relevant CSS:</strong>
        </p>
        <ul>
          <li>
            <strong>TwitterStatusItem</strong> : CSS class given to each Tweet, rendered as a
DIV. 
</li>
          <li>
            <strong>TwitterStatusTimestamp</strong> : CSS class given to each Tweet's timestamp
("32 minutes ago"), rendered as an inline SPAN within each Tweet element. 
</li>
        </ul>
        <h4>Using the Macro within a dasBlog Template
</h4>
        <p>
This macro is for use in the dasBlog HomeTemplate. The macro works just like any out-of-the
box macro, except that you must also include the alias specified within dasControls
entry the web.config (the value of the "macro" attribute). Your twitter
handle is required, though you can also optionally include the number of Tweets to
pull from Twitter (default: 10) and the number of minutes between each Twitter data
request (default: 5). Because everything happens on the server, there is no need to
include any of the Twitter JSON JavaScript libraries or HTML markup.
</p>
        <pre>&lt;% TwitterStatus("jayharris", 6, 5)|dasControls %&gt;</pre>
        <h3>Installation and Setup of dasControls
</h3>
        <p>
Download dasControls, extract the assembly into your dasBlog 'bin' directory.
</p>
        <p>
dasControls [Build 1.0.0.0] : <a title="Download dasControls v1.0" href="http://dascontrols.codeplex.com/Release/ProjectReleases.aspx" target="_blank">Download</a> | <a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank">Project
Page</a></p>
        <p>
Enable Custom Macros within your dasBlog installation, and add the Twitter macro to
your list of Custom Macros. 
<br />
First, ensure that the &lt;newtelligence.DasBlog.Macros&gt; section exists within
your web.config:
</p>
        <pre class="xml:nocontrols" name="code">&lt;newtelligence.DasBlog.Macros&gt;
  &lt;!-- Other Macro Libraries --&gt;
&lt;/newtelligence.DasBlog.Macros&gt;</pre>
        <p>
Second, ensure that the Macros Configuration Section is defined in to your web.config
&lt;configSections&gt;:
</p>
        <pre class="xml:nocontrols" name="code">&lt;configSections&gt;
  &lt;!—Other Configuration Sections --&gt;
  &lt;section requirePermission="false" name="newtelligence.DasBlog.Macros"
    type="newtelligence.DasBlog.Web.Core.MacroSectionHandler,
      newtelligence.DasBlog.Web.Core" /&gt;
&lt;/configSections&gt;</pre>
        <p>
Third, add the dasControls library entry to the dasBlog Macros section:
</p>
        <pre class="xml:nocontrols" name="code">&lt;newtelligence.DasBlog.Macros&gt;
  &lt;add macro="dasControls"
    type="HarrisDesigns.Controls.dasBlogControls.Macros,
      HarrisDesigns.Controls.dasBlogControls"/&gt;
&lt;/newtelligence.DasBlog.Macros&gt;</pre>
        <h4>
        </h4>
        <h3>Roadmap for dasControls
</h3>
        <p>
In the upcoming weeks and months, I plan on adding additional macros to the dasControls
library, including Delicious, Google Reader's Shared Items, and Facebook. If you're
interested in any others, or have any ideas, please let me know.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:238d54f0-5dde-4a71-b7ed-b73b8f647b47" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/dasBlog" rel="tag">dasBlog</a>,<a href="http://technorati.com/tags/dasControls" rel="tag">dasControls</a>,<a href="http://technorati.com/tags/Open+Source" rel="tag">Open
Source</a>,<a href="http://technorati.com/tags/CodePlex" rel="tag">CodePlex</a>,<a href="http://technorati.com/tags/SEO" rel="tag">SEO</a>,<a href="http://technorati.com/tags/Twitter" rel="tag">Twitter</a></div>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=fa601dad-9032-43a8-ba67-195baa859d88" />
      </body>
      <title>dasControls v1.0, a Twitter Status Macro for dasBlog</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,fa601dad-9032-43a8-ba67-195baa859d88.aspx</guid>
      <link>http://www.cptloadtest.com/2009/10/01/dasControls-V10-A-Twitter-Status-Macro-For-DasBlog.aspx</link>
      <pubDate>Thu, 01 Oct 2009 02:33:55 GMT</pubDate>
      <description>&lt;p&gt;
If you have read my post on &lt;a title="Blog Post: Misconceptions on JavaScript Plugins and SEO" href="http://www.cptloadtest.com/2009/08/31/Misconceptions-On-JavaScript-Plugins-And-SEO.aspx" target="_blank"&gt;Misconceptions
on JavaScript Plugins and SEO&lt;/a&gt;, you know that search engines don't do JavaScript.
Though these plugins and libraries (such as one for pulling your latest Twitter Updates)
are nice for adding dynamic content for your users, they are just end-user flare and
add nothing to your SEO rankings. They also put an unnecessary tax on your users,
as each client browser is responsible for independently retrieving the external content;
the time for your page to render is extended by a few seconds as the client must first
download the JS library then make the JSON/AJAX request for your content.
&lt;/p&gt;
&lt;p&gt;
In response to this, I have created &lt;a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank"&gt;dasControls&lt;/a&gt;,
a library of custom macros for dasBlog (the blogging engine that powers &lt;a href="http://www.cptloadtest.com"&gt;www.cptloadtest.com&lt;/a&gt;).
I have started with content that is driven by custom JavaScript libraries and convert
the content and data retrieval into server-side controls. For now, dasControls contains
only a Twitter Status macro, but I intend to add more controls in the coming months.
&lt;/p&gt;
&lt;p&gt;
dasControls [Build 1.0.0.0] : &lt;a title="Download dasControls v1.0" href="http://dascontrols.codeplex.com/Release/ProjectReleases.aspx" target="_blank"&gt;Download&lt;/a&gt; | &lt;a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank"&gt;Project
Page&lt;/a&gt;
&lt;/p&gt;
&lt;h3&gt;dasControls TwitterStatus Macro
&lt;/h3&gt;
&lt;p&gt;
The TwitterStatus macro uses server-side retrieval of your Twitter data, eliminating
all client-side JavaScript calls for your tweets. By placing the Twitter request on
the server, the data is also available to any search engines that index your page.
Additionally, data is cached on the server, and new updates are retrieved based on
the polling interval you specify. When using real-time client-side JavaScript calls,
there is a 2-5 second delay for your end-users while the data is retrieved from Twitter;
by caching the data on the local server, this delay is eliminated, and the content
for each user is delivered from the local cache, lightening the load for the end-user
while avoiding an undue burden for high-traffic sites.
&lt;/p&gt;
&lt;p&gt;
&lt;strong&gt;Macro Name:&lt;/strong&gt; TwitterStatus 
&lt;br /&gt;
&lt;strong&gt;Macro Syntax:&lt;/strong&gt; &amp;lt;% TwitterStatus(&amp;quot;user name&amp;quot;[, number
of tweets[, polling interval]])|dasControls %&amp;gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;User Name&lt;/strong&gt; : String. Your Twitter handle. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Number of Tweets&lt;/strong&gt; : Integer. The number of tweets to retrieve and
display. [default: 10] 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Polling Interval &lt;/strong&gt;: Integer. The number of minutes between each Twitter
retrieval. [default: 5] 
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
&lt;strong&gt;Relevant CSS:&lt;/strong&gt;
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TwitterStatusItem&lt;/strong&gt; : CSS class given to each Tweet, rendered as a
DIV. 
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TwitterStatusTimestamp&lt;/strong&gt; : CSS class given to each Tweet's timestamp
(&amp;quot;32 minutes ago&amp;quot;), rendered as an inline SPAN within each Tweet element. 
&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;Using the Macro within a dasBlog Template
&lt;/h4&gt;
&lt;p&gt;
This macro is for use in the dasBlog HomeTemplate. The macro works just like any out-of-the
box macro, except that you must also include the alias specified within dasControls
entry the web.config (the value of the &amp;quot;macro&amp;quot; attribute). Your twitter
handle is required, though you can also optionally include the number of Tweets to
pull from Twitter (default: 10) and the number of minutes between each Twitter data
request (default: 5). Because everything happens on the server, there is no need to
include any of the Twitter JSON JavaScript libraries or HTML markup.
&lt;/p&gt;
&lt;pre&gt;&amp;lt;% TwitterStatus(&amp;quot;jayharris&amp;quot;, 6, 5)|dasControls %&amp;gt;&lt;/pre&gt;
&lt;h3&gt;Installation and Setup of dasControls
&lt;/h3&gt;
&lt;p&gt;
Download dasControls, extract the assembly into your dasBlog 'bin' directory.
&lt;/p&gt;
&lt;p&gt;
dasControls [Build 1.0.0.0] : &lt;a title="Download dasControls v1.0" href="http://dascontrols.codeplex.com/Release/ProjectReleases.aspx" target="_blank"&gt;Download&lt;/a&gt; | &lt;a title="dasControls on CodePlex" href="http://dascontrols.codeplex.com/" target="_blank"&gt;Project
Page&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Enable Custom Macros within your dasBlog installation, and add the Twitter macro to
your list of Custom Macros. 
&lt;br /&gt;
First, ensure that the &amp;lt;newtelligence.DasBlog.Macros&amp;gt; section exists within
your web.config:
&lt;/p&gt;
&lt;pre class="xml:nocontrols" name="code"&gt;&amp;lt;newtelligence.DasBlog.Macros&amp;gt;
  &amp;lt;!-- Other Macro Libraries --&amp;gt;
&amp;lt;/newtelligence.DasBlog.Macros&amp;gt;&lt;/pre&gt;
&lt;p&gt;
Second, ensure that the Macros Configuration Section is defined in to your web.config
&amp;lt;configSections&amp;gt;:
&lt;/p&gt;
&lt;pre class="xml:nocontrols" name="code"&gt;&amp;lt;configSections&amp;gt;
  &amp;lt;!—Other Configuration Sections --&amp;gt;
  &amp;lt;section requirePermission=&amp;quot;false&amp;quot; name=&amp;quot;newtelligence.DasBlog.Macros&amp;quot;
    type=&amp;quot;newtelligence.DasBlog.Web.Core.MacroSectionHandler,
      newtelligence.DasBlog.Web.Core&amp;quot; /&amp;gt;
&amp;lt;/configSections&amp;gt;&lt;/pre&gt;
&lt;p&gt;
Third, add the dasControls library entry to the dasBlog Macros section:
&lt;/p&gt;
&lt;pre class="xml:nocontrols" name="code"&gt;&amp;lt;newtelligence.DasBlog.Macros&amp;gt;
  &amp;lt;add macro=&amp;quot;dasControls&amp;quot;
    type=&amp;quot;HarrisDesigns.Controls.dasBlogControls.Macros,
      HarrisDesigns.Controls.dasBlogControls&amp;quot;/&amp;gt;
&amp;lt;/newtelligence.DasBlog.Macros&amp;gt;&lt;/pre&gt;
&lt;h4&gt;
&lt;/h4&gt;
&lt;h3&gt;Roadmap for dasControls
&lt;/h3&gt;
&lt;p&gt;
In the upcoming weeks and months, I plan on adding additional macros to the dasControls
library, including Delicious, Google Reader's Shared Items, and Facebook. If you're
interested in any others, or have any ideas, please let me know.
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:238d54f0-5dde-4a71-b7ed-b73b8f647b47" class="wlWriterEditableSmartContent"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/dasBlog" rel="tag"&gt;dasBlog&lt;/a&gt;,&lt;a href="http://technorati.com/tags/dasControls" rel="tag"&gt;dasControls&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Open+Source" rel="tag"&gt;Open
Source&lt;/a&gt;,&lt;a href="http://technorati.com/tags/CodePlex" rel="tag"&gt;CodePlex&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SEO" rel="tag"&gt;SEO&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=fa601dad-9032-43a8-ba67-195baa859d88" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,fa601dad-9032-43a8-ba67-195baa859d88.aspx</comments>
      <category>Blogging</category>
      <category>dasControls</category>
      <category>JavaScript</category>
      <category>SEO</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=88fb8162-b06b-4df8-91ef-c2aefe0e1b8f</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,88fb8162-b06b-4df8-91ef-c2aefe0e1b8f.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,88fb8162-b06b-4df8-91ef-c2aefe0e1b8f.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=88fb8162-b06b-4df8-91ef-c2aefe0e1b8f</wfw:commentRss>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Search Engine Optimization is high on the radar, right now. Whether it be the quest
for the first Coupon site in Bing, the highest Cosmetics site on Google, or the top-ranked
"Jay Harris" on every search engine, the war is waged daily throughout the
internet. For companies, it's the next sale. For people, it's the next job. Dollars
are on the line in a never-ending battle for supremacy.
</p>
        <p>
One of the contributing factors in your Search Engine Ranking is Content. Fresh, new
content brings more search engine crawls. More crawls contributes to higher rankings.
Search engines like sites that are constantly providing new content; it lets the engine
know that the site is not dead or abandoned. And though this new content idea works
out well for the New York Times and CNN, not everyone has a team of staff writers
who are paid to constantly produce new content. So we shortcut. We don't so much have
to have new content as long as we make Google think we have new content. There are
hundreds if not thousands of JavaScript plugins out there to provide fresh content
to our readers, ranging from Picasa photos, to Twitter updates, to AdWords, to Microsoft
Gamercard tags. But I have to let you in on a little secret:
</p>
        <p>
JavaScript Plugins do nothing for SEO. 
<br />
Nothing. 
<br />
Search engine spiders don't do JavaScript.
</p>
        <p>
"This must be a lie. When I look at my site, I see my new photos, or my new tweets,
or my new Achievement Points; why don't the spiders see it, too?" Well, it's
true. Google Spiders, and most other Search Engine Spiders, <a title="Google Webmaster Guidelines: Search Engine spiders do not execute JavaScript" href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=35769#2" target="_blank">don't
do JavaScript</a>, which is why JS provides no SEO contribution; spiders do not index
what they do not see. A look through your traffic monitor, like Google Analytics,
will often show a disparity between logged traffic and what is actually accounted
for in Web Server logs. Analytics, a JavaScript-based traffic monitor, only logs about
40% of the total traffic to this site (excluding traffic to the RSS feed), which means
that the other 60% of my visitors have JavaScript disabled. A JavaScript Disabled
on 60% of all browsers seems like a ridiculously high percentage unless you consider
that Spiders and Bots do not execute JavaScript.
</p>
        <p>
Just like Google doesn't see the pretty layout from your stylesheet, Google also doesn't
see the dynamic content from your JavaScript. Pulling down HTML, (since it is all
just text, anyway) is easy; there's not even a lot of overhead associated with parsing
that HTML. But add in some JavaScript, and suddenly there's a lot more effort involved
in crawling your page, especially since there is a lot of bad JavaScript out there.
So search engines just check what has been written into your HTML. They read the the
URL, the keywords and META description, but only the content as rendered by the server.
JavaScript is not touched, and JavaScript-based content is not indexed.
</p>
        <p>
So how do you get around this? How do you get this SEO boost, since JavaScript isn't
an available option?
</p>
        <p>
Use plug-ins and utilities that pull your dynamic data server-side, rather than client-side.
Create a custom WebControl that will download and parse your latest Twitter updates.
Create a dasBlog macro to create your Microsoft Gamertag. By putting this responsibility
on the server, not only will you make life easier on your end user (one less JavaScript
library to download), but you also make this new content available to indexing engines,
which can only help your Google Juice.
</p>
        <h4>Update:
</h4>
        <p>
I've been working on a set of macros for dasBlog to start pulling my dynamic content
retrievals to the server. Keep an eye out over the next couple of days for the release
of my first macro, a Twitter Status dasBlog macro that will replace the need for the
Twitter JS libraries on your site.
</p>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:aac5652b-95d9-407d-8780-9361eae9b5de" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/JavaScript" rel="tag">JavaScript</a>,<a href="http://technorati.com/tags/SEO" rel="tag">SEO</a>,<a href="http://technorati.com/tags/Twitter" rel="tag">Twitter</a></div>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=88fb8162-b06b-4df8-91ef-c2aefe0e1b8f" />
      </body>
      <title>Misconceptions on JavaScript Plugins and SEO</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,88fb8162-b06b-4df8-91ef-c2aefe0e1b8f.aspx</guid>
      <link>http://www.cptloadtest.com/2009/08/31/Misconceptions-On-JavaScript-Plugins-And-SEO.aspx</link>
      <pubDate>Mon, 31 Aug 2009 12:47:29 GMT</pubDate>
      <description>&lt;p&gt;
Search Engine Optimization is high on the radar, right now. Whether it be the quest
for the first Coupon site in Bing, the highest Cosmetics site on Google, or the top-ranked
&amp;quot;Jay Harris&amp;quot; on every search engine, the war is waged daily throughout the
internet. For companies, it's the next sale. For people, it's the next job. Dollars
are on the line in a never-ending battle for supremacy.
&lt;/p&gt;
&lt;p&gt;
One of the contributing factors in your Search Engine Ranking is Content. Fresh, new
content brings more search engine crawls. More crawls contributes to higher rankings.
Search engines like sites that are constantly providing new content; it lets the engine
know that the site is not dead or abandoned. And though this new content idea works
out well for the New York Times and CNN, not everyone has a team of staff writers
who are paid to constantly produce new content. So we shortcut. We don't so much have
to have new content as long as we make Google think we have new content. There are
hundreds if not thousands of JavaScript plugins out there to provide fresh content
to our readers, ranging from Picasa photos, to Twitter updates, to AdWords, to Microsoft
Gamercard tags. But I have to let you in on a little secret:
&lt;/p&gt;
&lt;p&gt;
JavaScript Plugins do nothing for SEO. 
&lt;br /&gt;
Nothing. 
&lt;br /&gt;
Search engine spiders don't do JavaScript.
&lt;/p&gt;
&lt;p&gt;
&amp;quot;This must be a lie. When I look at my site, I see my new photos, or my new tweets,
or my new Achievement Points; why don't the spiders see it, too?&amp;quot; Well, it's
true. Google Spiders, and most other Search Engine Spiders, &lt;a title="Google Webmaster Guidelines: Search Engine spiders do not execute JavaScript" href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;amp;answer=35769#2" target="_blank"&gt;don't
do JavaScript&lt;/a&gt;, which is why JS provides no SEO contribution; spiders do not index
what they do not see. A look through your traffic monitor, like Google Analytics,
will often show a disparity between logged traffic and what is actually accounted
for in Web Server logs. Analytics, a JavaScript-based traffic monitor, only logs about
40% of the total traffic to this site (excluding traffic to the RSS feed), which means
that the other 60% of my visitors have JavaScript disabled. A JavaScript Disabled
on 60% of all browsers seems like a ridiculously high percentage unless you consider
that Spiders and Bots do not execute JavaScript.
&lt;/p&gt;
&lt;p&gt;
Just like Google doesn't see the pretty layout from your stylesheet, Google also doesn't
see the dynamic content from your JavaScript. Pulling down HTML, (since it is all
just text, anyway) is easy; there's not even a lot of overhead associated with parsing
that HTML. But add in some JavaScript, and suddenly there's a lot more effort involved
in crawling your page, especially since there is a lot of bad JavaScript out there.
So search engines just check what has been written into your HTML. They read the the
URL, the keywords and META description, but only the content as rendered by the server.
JavaScript is not touched, and JavaScript-based content is not indexed.
&lt;/p&gt;
&lt;p&gt;
So how do you get around this? How do you get this SEO boost, since JavaScript isn't
an available option?
&lt;/p&gt;
&lt;p&gt;
Use plug-ins and utilities that pull your dynamic data server-side, rather than client-side.
Create a custom WebControl that will download and parse your latest Twitter updates.
Create a dasBlog macro to create your Microsoft Gamertag. By putting this responsibility
on the server, not only will you make life easier on your end user (one less JavaScript
library to download), but you also make this new content available to indexing engines,
which can only help your Google Juice.
&lt;/p&gt;
&lt;h4&gt;Update:
&lt;/h4&gt;
&lt;p&gt;
I've been working on a set of macros for dasBlog to start pulling my dynamic content
retrievals to the server. Keep an eye out over the next couple of days for the release
of my first macro, a Twitter Status dasBlog macro that will replace the need for the
Twitter JS libraries on your site.
&lt;/p&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:aac5652b-95d9-407d-8780-9361eae9b5de" class="wlWriterEditableSmartContent"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/JavaScript" rel="tag"&gt;JavaScript&lt;/a&gt;,&lt;a href="http://technorati.com/tags/SEO" rel="tag"&gt;SEO&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Twitter" rel="tag"&gt;Twitter&lt;/a&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=88fb8162-b06b-4df8-91ef-c2aefe0e1b8f" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,88fb8162-b06b-4df8-91ef-c2aefe0e1b8f.aspx</comments>
      <category>Blogging</category>
      <category>JavaScript</category>
      <category>SEO</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=43d7519f-a17a-4fb2-a33d-3b27cd39f994</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,43d7519f-a17a-4fb2-a33d-3b27cd39f994.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,43d7519f-a17a-4fb2-a33d-3b27cd39f994.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=43d7519f-a17a-4fb2-a33d-3b27cd39f994</wfw:commentRss>
      <slash:comments>1</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
You may have heard of Robots.txt. Or, you may have seen requests for /Robots.txt in
your web traffic logs, and if the file doesn't exist, a related HTTP 404. But what
is this Robot file, and what does it do?
</p>
        <h3>Introduction to Robots.txt
</h3>
        <p>
When on a web server, Robots.txt is a file that directs Robots (a.k.a. Spiders or
Web Crawlers) on which files and directories to ignore when indexing a site. The file
is located on the root directory of the domain, and is typically used to hide areas
of a site from search engine indexing, such as to keep a page off of Google's radar
(such as my DasBlog login page) or if a page or image is not relevant to the traditional
content of a site (maybe a mockup page for a CSS demo contains content about puppies,
and you don't want to mislead potential audience). Robots request this file prior
to indexing your site, and its absence indicates that the robot is free to index the
entire domain. Also, note that each sub-domain uses a unique Robots.txt. When a spider
is indexing msdn.microsoft.com, it won't look for the file on www.microsoft.com; MSDN
will need its own copy of Robots.txt. 
</p>
        <h3>How do I make a Robots.txt?
</h3>
        <p>
Robots.txt is a simple text file. You can create it in Notepad, Word, Emacs, DOS Edit,
or your favorite text editor. Also, the file belongs in the root of the domain on
your web server.
</p>
        <h4>Allow all robots to access everything:
</h4>
        <p>
The most basic file will be to authorize all robots to index the entire site. The
asterisk [*] for <em>User Agent</em> indicates that the rule applies to all robots,
and by leaving the value of <em>Disallow</em> blank rather than including a path,
it effectively disallows nothing and allows everything.
</p>
        <pre class="plain:nocontrols" name="code"># Allow all robots to access everything
User-agent: *
Disallow:</pre>
        <h4>Block all robots from accessing anything:
</h4>
        <p>
Conversely, with only one more character, we can invert the entire file and block
everything. By setting <em>Disallow</em> to a root slash, every file and directory
stemming from the root (in other words, the entire site) will be blocked from robot
indexing.
</p>
        <pre class="plain:nocontrols" name="code"># Block all robots from accessing anything
User-agent: *
Disallow: /</pre>
        <h4>Allow all robots to index everything except scripts, logs, images, and that CSS
demo on Puppies:
</h4>
        <p>
          <em>Disallow</em> is a partial-match string; setting <em>Disallow</em> to "image"
would match both <em>/images/</em> and <em>/imageHtmlTagDemo.html</em>. <em>Disallow</em> can
also be included multiple times with different values to disallow a robot from multiple
files and directories.
</p>
        <pre class="plain:nocontrols" name="code"># Block all robots from accessing scripts, logs,
#    images, and that CSS demo on Puppies
User-agent: *
Disallow: /images/
Disallow: /logs/
Disallow: /scripts/
Disallow: /demos/cssDemo/puppies.html</pre>
        <h4>Block all robots from accessing anything, except Google, which is only blocked
from images:
</h4>
        <p>
Just as a browser has a user agent, so does a robot. For example, "Googlebot/2.1
(http://www.google.com/bot.html)", is one of the user agents for Google's indexer.
Like <em>Disallow</em>, the <em>User-agent</em> value in Robots.txt is a partial-match
string, so simply setting the value to "Googlebot" is sufficient for a match.
Also, the <em>User-agent</em> and <em>Disallow</em> entries cascade, with the most
specific User Agent setting is the one that is recognized.
</p>
        <pre class="plain:nocontrols" name="code"># Block all robots from accessing anything,
#    except Google, which is only blocked from images
User-agent: *
Disallow: /
User-agent: Googlebot
Disallow: /images/</pre>
        <h3>Shortcomings of Robots.txt
</h3>
        <p>
Similar to the <a title="Wikipedia: Pirate Code" href="http://en.wikipedia.org/wiki/Pirate_code" rel="nofollow">Code
of the Order of the Brethren</a>, Robots.txt "is more what you'd call 'guidelines'
than actual rules." Robots.txt is not a standardized protocol, nor is it a requirement.
Only the "honorable" robots such as the Google or Yahoo search spiders adhere
to the file's instructions; other less-honorable bots, such as a spam spider searching
for email addresses, largely ignore the file.
</p>
        <p>
Also, do not use the file for access control. Robots.txt is just a suggestion for
search indexing, and will by no means block requests to a disallowed directory of
file. These disallowed URLs are still freely available to anyone on the web. Additionally,
the contents of this file can be used to against you, as it the items you place in
it may indicate areas of the site that are intended to be secret or private; this
information could be used to prioritize candidates for a malicious attack with disallowed
pages being the first places to target.
</p>
        <p>
Finally, this file must be located in the root of the domain: www.mydomain.com/robots.txt.
If your site is in a sub-folder from the domain, such as www.mydomain.com/~username/,
the file must still be on the root of the domain, and you may need to speak with your
webmaster to get your modifications added to the file.
</p>
        <h3>Other Resources:
</h3>
        <ul>
          <li>
The Web Robots Pages : <a href="http://www.robotstxt.org">http://www.robotstxt.org</a></li>
          <li>
Wikipedia : <a title="http://en.wikipedia.org/wiki/Robots.txt" href="http://en.wikipedia.org/wiki/Robots.txt">http://en.wikipedia.org/wiki/Robots.txt</a></li>
        </ul>
        <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e5842e47-5b09-4532-a0d2-8f965492aefc" class="wlWriterEditableSmartContent">Technorati
Tags: <a href="http://technorati.com/tags/SEO" rel="tag">SEO</a>,<a href="http://technorati.com/tags/Robots.txt" rel="tag">Robots.txt</a></div>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=43d7519f-a17a-4fb2-a33d-3b27cd39f994" />
      </body>
      <title>Virtues and Villainy of Robots.txt</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,43d7519f-a17a-4fb2-a33d-3b27cd39f994.aspx</guid>
      <link>http://www.cptloadtest.com/2009/05/15/Virtues-And-Villainy-Of-Robotstxt.aspx</link>
      <pubDate>Fri, 15 May 2009 13:31:37 GMT</pubDate>
      <description>&lt;p&gt;
You may have heard of Robots.txt. Or, you may have seen requests for /Robots.txt in
your web traffic logs, and if the file doesn't exist, a related HTTP 404. But what
is this Robot file, and what does it do?
&lt;/p&gt;
&lt;h3&gt;Introduction to Robots.txt
&lt;/h3&gt;
&lt;p&gt;
When on a web server, Robots.txt is a file that directs Robots (a.k.a. Spiders or
Web Crawlers) on which files and directories to ignore when indexing a site. The file
is located on the root directory of the domain, and is typically used to hide areas
of a site from search engine indexing, such as to keep a page off of Google's radar
(such as my DasBlog login page) or if a page or image is not relevant to the traditional
content of a site (maybe a mockup page for a CSS demo contains content about puppies,
and you don't want to mislead potential audience). Robots request this file prior
to indexing your site, and its absence indicates that the robot is free to index the
entire domain. Also, note that each sub-domain uses a unique Robots.txt. When a spider
is indexing msdn.microsoft.com, it won't look for the file on www.microsoft.com; MSDN
will need its own copy of Robots.txt. 
&lt;/p&gt;
&lt;h3&gt;How do I make a Robots.txt?
&lt;/h3&gt;
&lt;p&gt;
Robots.txt is a simple text file. You can create it in Notepad, Word, Emacs, DOS Edit,
or your favorite text editor. Also, the file belongs in the root of the domain on
your web server.
&lt;/p&gt;
&lt;h4&gt;Allow all robots to access everything:
&lt;/h4&gt;
&lt;p&gt;
The most basic file will be to authorize all robots to index the entire site. The
asterisk [*] for &lt;em&gt;User Agent&lt;/em&gt; indicates that the rule applies to all robots,
and by leaving the value of &lt;em&gt;Disallow&lt;/em&gt; blank rather than including a path,
it effectively disallows nothing and allows everything.
&lt;/p&gt;
&lt;pre class="plain:nocontrols" name="code"&gt;# Allow all robots to access everything
User-agent: *
Disallow:&lt;/pre&gt;
&lt;h4&gt;Block all robots from accessing anything:
&lt;/h4&gt;
&lt;p&gt;
Conversely, with only one more character, we can invert the entire file and block
everything. By setting &lt;em&gt;Disallow&lt;/em&gt; to a root slash, every file and directory
stemming from the root (in other words, the entire site) will be blocked from robot
indexing.
&lt;/p&gt;
&lt;pre class="plain:nocontrols" name="code"&gt;# Block all robots from accessing anything
User-agent: *
Disallow: /&lt;/pre&gt;
&lt;h4&gt;Allow all robots to index everything except scripts, logs, images, and that CSS
demo on Puppies:
&lt;/h4&gt;
&lt;p&gt;
&lt;em&gt;Disallow&lt;/em&gt; is a partial-match string; setting &lt;em&gt;Disallow&lt;/em&gt; to &amp;quot;image&amp;quot;
would match both &lt;em&gt;/images/&lt;/em&gt; and &lt;em&gt;/imageHtmlTagDemo.html&lt;/em&gt;. &lt;em&gt;Disallow&lt;/em&gt; can
also be included multiple times with different values to disallow a robot from multiple
files and directories.
&lt;/p&gt;
&lt;pre class="plain:nocontrols" name="code"&gt;# Block all robots from accessing scripts, logs,
#    images, and that CSS demo on Puppies
User-agent: *
Disallow: /images/
Disallow: /logs/
Disallow: /scripts/
Disallow: /demos/cssDemo/puppies.html&lt;/pre&gt;
&lt;h4&gt;Block all robots from accessing anything, except Google, which is only blocked
from images:
&lt;/h4&gt;
&lt;p&gt;
Just as a browser has a user agent, so does a robot. For example, &amp;quot;Googlebot/2.1
(http://www.google.com/bot.html)&amp;quot;, is one of the user agents for Google's indexer.
Like &lt;em&gt;Disallow&lt;/em&gt;, the &lt;em&gt;User-agent&lt;/em&gt; value in Robots.txt is a partial-match
string, so simply setting the value to &amp;quot;Googlebot&amp;quot; is sufficient for a match.
Also, the &lt;em&gt;User-agent&lt;/em&gt; and &lt;em&gt;Disallow&lt;/em&gt; entries cascade, with the most
specific User Agent setting is the one that is recognized.
&lt;/p&gt;
&lt;pre class="plain:nocontrols" name="code"&gt;# Block all robots from accessing anything,
#    except Google, which is only blocked from images
User-agent: *
Disallow: /
User-agent: Googlebot
Disallow: /images/&lt;/pre&gt;
&lt;h3&gt;Shortcomings of Robots.txt
&lt;/h3&gt;
&lt;p&gt;
Similar to the &lt;a title="Wikipedia: Pirate Code" href="http://en.wikipedia.org/wiki/Pirate_code" rel="nofollow"&gt;Code
of the Order of the Brethren&lt;/a&gt;, Robots.txt &amp;quot;is more what you'd call 'guidelines'
than actual rules.&amp;quot; Robots.txt is not a standardized protocol, nor is it a requirement.
Only the &amp;quot;honorable&amp;quot; robots such as the Google or Yahoo search spiders adhere
to the file's instructions; other less-honorable bots, such as a spam spider searching
for email addresses, largely ignore the file.
&lt;/p&gt;
&lt;p&gt;
Also, do not use the file for access control. Robots.txt is just a suggestion for
search indexing, and will by no means block requests to a disallowed directory of
file. These disallowed URLs are still freely available to anyone on the web. Additionally,
the contents of this file can be used to against you, as it the items you place in
it may indicate areas of the site that are intended to be secret or private; this
information could be used to prioritize candidates for a malicious attack with disallowed
pages being the first places to target.
&lt;/p&gt;
&lt;p&gt;
Finally, this file must be located in the root of the domain: www.mydomain.com/robots.txt.
If your site is in a sub-folder from the domain, such as www.mydomain.com/~username/,
the file must still be on the root of the domain, and you may need to speak with your
webmaster to get your modifications added to the file.
&lt;/p&gt;
&lt;h3&gt;Other Resources:
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
The Web Robots Pages : &lt;a href="http://www.robotstxt.org"&gt;http://www.robotstxt.org&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Wikipedia : &lt;a title="http://en.wikipedia.org/wiki/Robots.txt" href="http://en.wikipedia.org/wiki/Robots.txt"&gt;http://en.wikipedia.org/wiki/Robots.txt&lt;/a&gt; 
&lt;/li&gt;
&lt;/ul&gt;
&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e5842e47-5b09-4532-a0d2-8f965492aefc" class="wlWriterEditableSmartContent"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/SEO" rel="tag"&gt;SEO&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Robots.txt" rel="tag"&gt;Robots.txt&lt;/a&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=43d7519f-a17a-4fb2-a33d-3b27cd39f994" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,43d7519f-a17a-4fb2-a33d-3b27cd39f994.aspx</comments>
      <category>Blogging</category>
      <category>SEO</category>
    </item>
    <item>
      <trackback:ping>http://www.cptloadtest.com/Trackback.aspx?guid=71ba8b42-6bcc-49e3-9f2f-48de47d8f275</trackback:ping>
      <pingback:server>http://www.cptloadtest.com/pingback.aspx</pingback:server>
      <pingback:target>http://www.cptloadtest.com/PermaLink,guid,71ba8b42-6bcc-49e3-9f2f-48de47d8f275.aspx</pingback:target>
      <dc:creator>Jay Harris</dc:creator>
      <wfw:comment>http://www.cptloadtest.com/CommentView,guid,71ba8b42-6bcc-49e3-9f2f-48de47d8f275.aspx</wfw:comment>
      <wfw:commentRss>http://www.cptloadtest.com/SyndicationService.asmx/GetEntryCommentsRss?guid=71ba8b42-6bcc-49e3-9f2f-48de47d8f275</wfw:commentRss>
      <slash:comments>4</slash:comments>
      <body xmlns="http://www.w3.org/1999/xhtml">
        <p>
Did you know that <em>yourdomain.com</em> and <em>www.yourdomain.com</em> are actually
different sites? Are they both serving the same content? If so, it may be negatively
impacting your search engine rankings.
</p>
        <h3>Subdomains and the Synonymous 'WWW'
</h3>
        <p>
Sub-domains are the prefix to a domain (<em>http://subdomain.yourdomain.com</em>),
and are treated by browsers, computers, domain name systems (DNS), search engines,
and the general internet as separate, individual web sites. Google's primary web presence, <a href="http://www.google.com">http://www.google.com</a>,
is very different than Google Mail, <a href="http://mail.google.com">http://mail.google.com</a>,
or Google Documents, <a href="http://docs.google.com">http://docs.google.com</a>,
all because of subdomains. However, what many do not realize is that <em>www</em> is,
itself, a subdomain.
</p>
        <p>
A domain, on its own, requires no <em>www</em> prefix; a subdomain-less <em>http://yourdomain.com</em> should
be sufficient for serving up a web site. And since <em>www</em> is a subdomain, dropping
the prefix could potentially return a different response. There are some sites that
will fail to return without the prefix, and some sites that fail with it, but the
most common practice is that the <em>www</em> subdomain is synonymous for no subdomain
at all.
</p>
        <h3>The Synonymous WWW and SEO
</h3>
        <p>
The issue with having two synonymous URLs (<em>http://yourdomain.com</em> and <em>http://www.yourdomain.com</em>)
is that search engines may interpret them as separate sites, even if they are serving
the same content. The two addresses are technically independent and are potentially
serving unique content; to a cautious search engine, even if pages appear to contain
the same content, there may be something different under the covers. This means your
audience's search results returns two entries for the same content. Some users will
happen to click on <em>yourdomain.com</em> while others navigate to <em>www.yourdomain.com</em>,
splitting your traffic, your page hits, your search ranking between two sites, unnecessarily.
</p>
        <p>
HTTP Redirects will cure the issue. If you access <a href="http://google.com">http://google.com</a>,
your browser is instantly redirected to <a href="http://www.google.com">http://www.google.com</a>.
This is done through a HTTP 301 permanent redirect. Search Spiders recognize HTTP
response codes, and understand the 301 as a "use this other URL instead" command.
Many search engines, such as Google, will then update all page entries for the original
URI (<em>http://yourdomain.com</em>) and replace it with the 301's destination URL
(<em>http://www.yourdomain.com</em>). If there is already an entry for the destination
URL, the two entries will be merged together. The search entries for <em>yourdomain.com</em> and <em>www.yourdomain.com</em> will
now share traffic, share page hits, and share search ranking. Instead of having two
entries on the second and third pages of search results, combining these entries may
be just enough to place you on the first page of results.
</p>
        <blockquote>In addition to combining search entries for subdomains, you can also combine
root-level domains through HTTP 301. On this site, in addition to adding the <em>www</em> prefix
if no subdomain is specified, <a href="http://captainloadtest.com">captainloadtest.com</a> will
HTTP 301 redirect to <a href="http://www.cptloadtest.com">www.cptloadtest.com</a>.</blockquote>
        <h3>Combining the Synonyms
</h3>
        <p>
We need a way to implement an HTTP 301 redirect at the domain level for all requests
to a site; however, often we are using applications that may not grant us access to
the source, or we don't have the access into IIS through our host to set up redirects
for ourselves. <a href="http://www.cptloadtest.com/2008/11/11/URLRewritePart2HTTP301MovedPermanently.aspx">URL
Rewrite, Part 2</a> covers a great <a href="http://www.pluralsight.com/community/blogs/fritz/archive/2004/07/21/1651.aspx">drop-in
redirect module</a> by <a href="http://www.pluralsight.com/community/blogs/fritz/">Fritz
Onion</a> that uses a stand-alone assembly with a few additions in web.config to HTTP
301 redirect paths in your domain (it also supports HTTP 302 redirects). This module
is perfect for converting a WordPress blog post URL, such as <a href="http://www.cptloadtest.com/?p=56">cptloadtest.com/?p=56</a>,
to a DasBlog blog post URL like <a href="http://www.cptloadtest.com/2006/05/31/VSNetMacroCollapseAll.aspx">cptloadtest.com/2006/05/31/VSNetMacroCollapseAll.aspx</a>.
However, to redirect domains and subdomains, the module must go a step further and
redirect based on matches against the entire URL, such as directing http:// to https://
or captainloadtest.com to cptloadtest.com, which it does not support. It's time for
some modifications.
</p>
        <pre class="csharp:nocontrols:linenumber[20]" name="code">private void OnBeginRequest(object src, EventArgs e) {
  HttpApplication app = src as HttpApplication;
  string reqUrl = app.Request.Url.AbsoluteUri;
  redirections redirs
    = (redirections) ConfigurationManager.GetSection("redirections");

  foreach (Add a in redirs.Adds) {
    Regex regex = new Regex(a.targetUrl, RegexOptions.IgnoreCase);
    if (regex.IsMatch(reqUrl)) {
      string targetUrl = regex.Replace(reqUrl, a.destinationUrl, 1);

      if (a.permanent) {
        app.Response.StatusCode = 301; // make a permanent redirect
        app.Response.AddHeader("Location", targetUrl);
        app.Response.End();
      }
      else
        app.Response.Redirect(targetUrl);

      break;
    }    
  }
}</pre>
        <p>
By converting <em>app.Request.RawURL</em> to <em>app.Request.AbsoluteUri</em>, the
regular expression will now match against the entire URL, rather than just the requested
path. There is one downside to this change: the value is the actual path processed,
not necessarily what was in the originally requested URL. To this effect, the value
of <em>AbsoluteUri</em> for requesting <a href="http://www.cptloadtest.com?p=56">http://www.cptloadtest.com?p=56</a> is
actually <a href="http://www.cptloadtest.com/default.aspx?p=56">http://www.cptloadtest.com/default.aspx?p=56</a>;
by requesting the root directory, the default page is being processed, not the directory
itself, so <em>default.aspx</em> is added to the URL. Keep this in mind when setting
up your redirection rules. Also, the original code converted the URL to lower case;
with my modifications, I chose to maintain the case of the URL, since sometimes case
matters, and instead ignore case in the regular expression match using <em>RegexOptions.IgnoreCase</em>.
Finally, I made some other minor enhancements, like using the ConfigurationManager,
since ConfigurationSettings is now obsolete, and reusing the matching Regex instance
for replacements.
</p>
        <blockquote>
          <p>
            <strong>Download:</strong>
            <a href="http://www.cptloadtest.com/content/binary/RedirectModule.zip">RedirectModule.zip</a>
          </p>
          <p>
Includes:
</p>
          <ul>
            <li>
Source code for the drop-in Redirect Module 
</li>
            <li>
Sample web.config that uses the module 
</li>
            <li>
Compiled version of redirectmodule.dll</li>
          </ul>
          <p>
The code is based on the original <a href="http://www.pluralsight.com/community/blogs/fritz/archive/2004/07/21/1651.aspx">Redirect
Module</a> by <a href="http://www.pluralsight.com/community/blogs/fritz/default.aspx">Fritz
Onion</a> and the <a href="http://alt.pluralsight.com/wiki/default.aspx/Craig/XmlSerializerSectionHandler.html">Xml
Serializer Section Handler</a> by <a href="http://www.pluralsight.com/community/blogs/craig/default.aspx">Craig
Andera</a>. As always, this code is provided with no warranties or guarantees. Use
at your own risk. Your mileage may vary. Thanks to Fritz Onion for the original work,
and allowing me extend his code further.
</p>
        </blockquote>
        <p>
The usage is the same as Fritz Onion's original module. Drop the assembly into your
site's bin, and place a few lines into the web.config. The example below contains
the rules as they would apply to this site, 301 redirecting <a href="http://www.captainloadtest.com">http://www.captainloadtest.com</a> to <a href="http://www.cptloadtest.com">http://www.cptloadtest.com</a>,
and adding the <em>www</em> subdomain to any domain requests that have no subdomain.
</p>
        <pre class="xml:nocontrols:linenumber[20]" name="code">&lt;?xml version="1.0"?&gt;
&lt;configuration&gt;
  &lt;configSections&gt;
    &lt;section name="redirections"
      type="Pluralsight.Website.XmlSerializerSectionHandler, redirectmodule" /&gt;
  &lt;/configSections&gt;
  &lt;!-- Redirect Rules --&gt;
  &lt;redirections type="Pluralsight.Website.redirections, redirectmodule"&gt;
    &lt;!-- Domain Redirects //--&gt;
    &lt;add targetUrl="captainloadtest\.com/Default\.aspx"
      destinationUrl="cptloadtest.com/" permanent="true" /&gt;
    &lt;add targetUrl="captainloadtest\.com"
      destinationUrl="cptloadtest.com" permanent="true" /&gt;

    &lt;!-- Add 'WWW' to the domain request //--&gt;
    &lt;add targetUrl="://cptloadtest\.com/Default\.aspx"
      destinationUrl="://www.$1.com/" permanent="true" /&gt;
    &lt;add targetUrl="://cptloadtest\.com"
      destinationUrl="://www.$1.com" permanent="true" /&gt;

    &lt;!-- ...More Redirects --&gt;
  &lt;/redirections&gt;
  &lt;system.web&gt;
    &lt;httpModules&gt;
      &lt;add name="RedirectModule"
        type="Pluralsight.Website.RedirectModule, redirectmodule" /&gt;
    &lt;/httpModules&gt;
  &lt;/system.web&gt;
&lt;/configuration&gt;</pre>
        <p>
The component is easy to use, and can redirect your site traffic to any URL you choose.
Neither code changes to the application nor configuration changes to IIS are needed.
By using this module to combine synonymous versions of your URLs, such as alternate
domains or subdomains, you will improve your page ranking through combining duplicate
search result entries. One more step towards your own search engine optimization goals.
</p>
        <h3>URL Rewrite
</h3>
        <ul>
          <li>
Part 1: <a href="http://www.cptloadtest.com/2008/11/06/URLRewritePart1HTTP302TemporarilyRelocated.aspx">HTTP
302, Temporarily Relocated</a></li>
          <li>
Part 2: <a href="http://www.cptloadtest.com/2008/11/11/URLRewritePart2HTTP301MovedPermanently.aspx">HTTP
301, Moved Permanently</a></li>
          <li>
Part 3: Improving SEO and the 'www' subdomain</li>
        </ul>
        <div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:796ee61e-98c9-4ab1-8aef-6f3caa04ea6e" style="margin: 0px; padding: 0px; display: inline;">Technorati
Tags: <a href="http://technorati.com/tags/SEO" rel="tag">SEO</a>,<a href="http://technorati.com/tags/Search%20Engine%20Optimization" rel="tag">Search
Engine Optimization</a>,<a href="http://technorati.com/tags/Page%20Rank" rel="tag">Page
Rank</a>,<a href="http://technorati.com/tags/HTTP%20301" rel="tag">HTTP 301</a>,<a href="http://technorati.com/tags/ASP.NET" rel="tag">ASP.NET</a>,<a href="http://technorati.com/tags/Fritz%20Onion" rel="tag">Fritz
Onion</a></div>
        <img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=71ba8b42-6bcc-49e3-9f2f-48de47d8f275" />
      </body>
      <title>URL Rewrite, Part 3: Improving SEO and the 'www' subdomain</title>
      <guid isPermaLink="false">http://www.cptloadtest.com/PermaLink,guid,71ba8b42-6bcc-49e3-9f2f-48de47d8f275.aspx</guid>
      <link>http://www.cptloadtest.com/2008/12/04/URL-Rewrite-Part-3-Improving-SEO-And-The-Www-Subdomain.aspx</link>
      <pubDate>Thu, 04 Dec 2008 21:43:10 GMT</pubDate>
      <description>&lt;p&gt;
Did you know that &lt;em&gt;yourdomain.com&lt;/em&gt; and &lt;em&gt;www.yourdomain.com&lt;/em&gt; are actually
different sites? Are they both serving the same content? If so, it may be negatively
impacting your search engine rankings.
&lt;/p&gt;
&lt;h3&gt;Subdomains and the Synonymous 'WWW'
&lt;/h3&gt;
&lt;p&gt;
Sub-domains are the prefix to a domain (&lt;em&gt;http://subdomain.yourdomain.com&lt;/em&gt;),
and are treated by browsers, computers, domain name systems (DNS), search engines,
and the general internet as separate, individual web sites. Google's primary web presence, &lt;a href="http://www.google.com"&gt;http://www.google.com&lt;/a&gt;,
is very different than Google Mail, &lt;a href="http://mail.google.com"&gt;http://mail.google.com&lt;/a&gt;,
or Google Documents, &lt;a href="http://docs.google.com"&gt;http://docs.google.com&lt;/a&gt;,
all because of subdomains. However, what many do not realize is that &lt;em&gt;www&lt;/em&gt; is,
itself, a subdomain.
&lt;/p&gt;
&lt;p&gt;
A domain, on its own, requires no &lt;em&gt;www&lt;/em&gt; prefix; a subdomain-less &lt;em&gt;http://yourdomain.com&lt;/em&gt; should
be sufficient for serving up a web site. And since &lt;em&gt;www&lt;/em&gt; is a subdomain, dropping
the prefix could potentially return a different response. There are some sites that
will fail to return without the prefix, and some sites that fail with it, but the
most common practice is that the &lt;em&gt;www&lt;/em&gt; subdomain is synonymous for no subdomain
at all.
&lt;/p&gt;
&lt;h3&gt;The Synonymous WWW and SEO
&lt;/h3&gt;
&lt;p&gt;
The issue with having two synonymous URLs (&lt;em&gt;http://yourdomain.com&lt;/em&gt; and &lt;em&gt;http://www.yourdomain.com&lt;/em&gt;)
is that search engines may interpret them as separate sites, even if they are serving
the same content. The two addresses are technically independent and are potentially
serving unique content; to a cautious search engine, even if pages appear to contain
the same content, there may be something different under the covers. This means your
audience's search results returns two entries for the same content. Some users will
happen to click on &lt;em&gt;yourdomain.com&lt;/em&gt; while others navigate to &lt;em&gt;www.yourdomain.com&lt;/em&gt;,
splitting your traffic, your page hits, your search ranking between two sites, unnecessarily.
&lt;/p&gt;
&lt;p&gt;
HTTP Redirects will cure the issue. If you access &lt;a href="http://google.com"&gt;http://google.com&lt;/a&gt;,
your browser is instantly redirected to &lt;a href="http://www.google.com"&gt;http://www.google.com&lt;/a&gt;.
This is done through a HTTP 301 permanent redirect. Search Spiders recognize HTTP
response codes, and understand the 301 as a "use this other URL instead" command.
Many search engines, such as Google, will then update all page entries for the original
URI (&lt;em&gt;http://yourdomain.com&lt;/em&gt;) and replace it with the 301's destination URL
(&lt;em&gt;http://www.yourdomain.com&lt;/em&gt;). If there is already an entry for the destination
URL, the two entries will be merged together. The search entries for &lt;em&gt;yourdomain.com&lt;/em&gt; and &lt;em&gt;www.yourdomain.com&lt;/em&gt; will
now share traffic, share page hits, and share search ranking. Instead of having two
entries on the second and third pages of search results, combining these entries may
be just enough to place you on the first page of results.
&lt;/p&gt;
&lt;blockquote&gt;In addition to combining search entries for subdomains, you can also combine
root-level domains through HTTP 301. On this site, in addition to adding the &lt;em&gt;www&lt;/em&gt; prefix
if no subdomain is specified, &lt;a href="http://captainloadtest.com"&gt;captainloadtest.com&lt;/a&gt; will
HTTP 301 redirect to &lt;a href="http://www.cptloadtest.com"&gt;www.cptloadtest.com&lt;/a&gt;.&lt;/blockquote&gt; 
&lt;h3&gt;Combining the Synonyms
&lt;/h3&gt;
&lt;p&gt;
We need a way to implement an HTTP 301 redirect at the domain level for all requests
to a site; however, often we are using applications that may not grant us access to
the source, or we don't have the access into IIS through our host to set up redirects
for ourselves. &lt;a href="http://www.cptloadtest.com/2008/11/11/URLRewritePart2HTTP301MovedPermanently.aspx"&gt;URL
Rewrite, Part 2&lt;/a&gt; covers a great &lt;a href="http://www.pluralsight.com/community/blogs/fritz/archive/2004/07/21/1651.aspx"&gt;drop-in
redirect module&lt;/a&gt; by &lt;a href="http://www.pluralsight.com/community/blogs/fritz/"&gt;Fritz
Onion&lt;/a&gt; that uses a stand-alone assembly with a few additions in web.config to HTTP
301 redirect paths in your domain (it also supports HTTP 302 redirects). This module
is perfect for converting a WordPress blog post URL, such as &lt;a href="http://www.cptloadtest.com/?p=56"&gt;cptloadtest.com/?p=56&lt;/a&gt;,
to a DasBlog blog post URL like &lt;a href="http://www.cptloadtest.com/2006/05/31/VSNetMacroCollapseAll.aspx"&gt;cptloadtest.com/2006/05/31/VSNetMacroCollapseAll.aspx&lt;/a&gt;.
However, to redirect domains and subdomains, the module must go a step further and
redirect based on matches against the entire URL, such as directing http:// to https://
or captainloadtest.com to cptloadtest.com, which it does not support. It's time for
some modifications.
&lt;/p&gt;
&lt;pre class="csharp:nocontrols:linenumber[20]" name="code"&gt;private void OnBeginRequest(object src, EventArgs e) {
  HttpApplication app = src as HttpApplication;
  string reqUrl = app.Request.Url.AbsoluteUri;
  redirections redirs
    = (redirections) ConfigurationManager.GetSection("redirections");

  foreach (Add a in redirs.Adds) {
    Regex regex = new Regex(a.targetUrl, RegexOptions.IgnoreCase);
    if (regex.IsMatch(reqUrl)) {
      string targetUrl = regex.Replace(reqUrl, a.destinationUrl, 1);

      if (a.permanent) {
        app.Response.StatusCode = 301; // make a permanent redirect
        app.Response.AddHeader("Location", targetUrl);
        app.Response.End();
      }
      else
        app.Response.Redirect(targetUrl);

      break;
    }    
  }
}&lt;/pre&gt;
&lt;p&gt;
By converting &lt;em&gt;app.Request.RawURL&lt;/em&gt; to &lt;em&gt;app.Request.AbsoluteUri&lt;/em&gt;, the
regular expression will now match against the entire URL, rather than just the requested
path. There is one downside to this change: the value is the actual path processed,
not necessarily what was in the originally requested URL. To this effect, the value
of &lt;em&gt;AbsoluteUri&lt;/em&gt; for requesting &lt;a href="http://www.cptloadtest.com?p=56"&gt;http://www.cptloadtest.com?p=56&lt;/a&gt; is
actually &lt;a href="http://www.cptloadtest.com/default.aspx?p=56"&gt;http://www.cptloadtest.com/default.aspx?p=56&lt;/a&gt;;
by requesting the root directory, the default page is being processed, not the directory
itself, so &lt;em&gt;default.aspx&lt;/em&gt; is added to the URL. Keep this in mind when setting
up your redirection rules. Also, the original code converted the URL to lower case;
with my modifications, I chose to maintain the case of the URL, since sometimes case
matters, and instead ignore case in the regular expression match using &lt;em&gt;RegexOptions.IgnoreCase&lt;/em&gt;.
Finally, I made some other minor enhancements, like using the ConfigurationManager,
since ConfigurationSettings is now obsolete, and reusing the matching Regex instance
for replacements.
&lt;/p&gt;
&lt;blockquote&gt; 
&lt;p&gt;
&lt;strong&gt;Download:&lt;/strong&gt; &lt;a href="http://www.cptloadtest.com/content/binary/RedirectModule.zip"&gt;RedirectModule.zip&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Includes:
&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
Source code for the drop-in Redirect Module 
&lt;/li&gt;
&lt;li&gt;
Sample web.config that uses the module 
&lt;/li&gt;
&lt;li&gt;
Compiled version of redirectmodule.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;
The code is based on the original &lt;a href="http://www.pluralsight.com/community/blogs/fritz/archive/2004/07/21/1651.aspx"&gt;Redirect
Module&lt;/a&gt; by &lt;a href="http://www.pluralsight.com/community/blogs/fritz/default.aspx"&gt;Fritz
Onion&lt;/a&gt; and the &lt;a href="http://alt.pluralsight.com/wiki/default.aspx/Craig/XmlSerializerSectionHandler.html"&gt;Xml
Serializer Section Handler&lt;/a&gt; by &lt;a href="http://www.pluralsight.com/community/blogs/craig/default.aspx"&gt;Craig
Andera&lt;/a&gt;. As always, this code is provided with no warranties or guarantees. Use
at your own risk. Your mileage may vary. Thanks to Fritz Onion for the original work,
and allowing me extend his code further.
&lt;/p&gt;
&lt;/blockquote&gt; 
&lt;p&gt;
The usage is the same as Fritz Onion's original module. Drop the assembly into your
site's bin, and place a few lines into the web.config. The example below contains
the rules as they would apply to this site, 301 redirecting &lt;a href="http://www.captainloadtest.com"&gt;http://www.captainloadtest.com&lt;/a&gt; to &lt;a href="http://www.cptloadtest.com"&gt;http://www.cptloadtest.com&lt;/a&gt;,
and adding the &lt;em&gt;www&lt;/em&gt; subdomain to any domain requests that have no subdomain.
&lt;/p&gt;
&lt;pre class="xml:nocontrols:linenumber[20]" name="code"&gt;&amp;lt;?xml version="1.0"?&amp;gt;
&amp;lt;configuration&amp;gt;
  &amp;lt;configSections&amp;gt;
    &amp;lt;section name="redirections"
      type="Pluralsight.Website.XmlSerializerSectionHandler, redirectmodule" /&amp;gt;
  &amp;lt;/configSections&amp;gt;
  &amp;lt;!-- Redirect Rules --&amp;gt;
  &amp;lt;redirections type="Pluralsight.Website.redirections, redirectmodule"&amp;gt;
    &amp;lt;!-- Domain Redirects //--&amp;gt;
    &amp;lt;add targetUrl="captainloadtest\.com/Default\.aspx"
      destinationUrl="cptloadtest.com/" permanent="true" /&amp;gt;
    &amp;lt;add targetUrl="captainloadtest\.com"
      destinationUrl="cptloadtest.com" permanent="true" /&amp;gt;

    &amp;lt;!-- Add 'WWW' to the domain request //--&amp;gt;
    &amp;lt;add targetUrl="://cptloadtest\.com/Default\.aspx"
      destinationUrl="://www.$1.com/" permanent="true" /&amp;gt;
    &amp;lt;add targetUrl="://cptloadtest\.com"
      destinationUrl="://www.$1.com" permanent="true" /&amp;gt;

    &amp;lt;!-- ...More Redirects --&amp;gt;
  &amp;lt;/redirections&amp;gt;
  &amp;lt;system.web&amp;gt;
    &amp;lt;httpModules&amp;gt;
      &amp;lt;add name="RedirectModule"
        type="Pluralsight.Website.RedirectModule, redirectmodule" /&amp;gt;
    &amp;lt;/httpModules&amp;gt;
  &amp;lt;/system.web&amp;gt;
&amp;lt;/configuration&amp;gt;&lt;/pre&gt;
&lt;p&gt;
The component is easy to use, and can redirect your site traffic to any URL you choose.
Neither code changes to the application nor configuration changes to IIS are needed.
By using this module to combine synonymous versions of your URLs, such as alternate
domains or subdomains, you will improve your page ranking through combining duplicate
search result entries. One more step towards your own search engine optimization goals.
&lt;/p&gt;
&lt;h3&gt;URL Rewrite
&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;
Part 1: &lt;a href="http://www.cptloadtest.com/2008/11/06/URLRewritePart1HTTP302TemporarilyRelocated.aspx"&gt;HTTP
302, Temporarily Relocated&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Part 2: &lt;a href="http://www.cptloadtest.com/2008/11/11/URLRewritePart2HTTP301MovedPermanently.aspx"&gt;HTTP
301, Moved Permanently&lt;/a&gt; 
&lt;/li&gt;
&lt;li&gt;
Part 3: Improving SEO and the 'www' subdomain&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:796ee61e-98c9-4ab1-8aef-6f3caa04ea6e" style="margin: 0px; padding: 0px; display: inline;"&gt;Technorati
Tags: &lt;a href="http://technorati.com/tags/SEO" rel="tag"&gt;SEO&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Search%20Engine%20Optimization" rel="tag"&gt;Search
Engine Optimization&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Page%20Rank" rel="tag"&gt;Page
Rank&lt;/a&gt;,&lt;a href="http://technorati.com/tags/HTTP%20301" rel="tag"&gt;HTTP 301&lt;/a&gt;,&lt;a href="http://technorati.com/tags/ASP.NET" rel="tag"&gt;ASP.NET&lt;/a&gt;,&lt;a href="http://technorati.com/tags/Fritz%20Onion" rel="tag"&gt;Fritz
Onion&lt;/a&gt;
&lt;/div&gt;
&lt;img width="0" height="0" src="http://www.cptloadtest.com/aggbug.ashx?id=71ba8b42-6bcc-49e3-9f2f-48de47d8f275" /&gt;</description>
      <comments>http://www.cptloadtest.com/CommentView,guid,71ba8b42-6bcc-49e3-9f2f-48de47d8f275.aspx</comments>
      <category>ASP.Net</category>
      <category>Blogging</category>
      <category>Programming</category>
      <category>SEO</category>
    </item>
  </channel>
</rss>