<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>radikalFX &#187; SEO</title>
	<atom:link href="http://radikalfx.com/category/seo/feed/" rel="self" type="application/rss+xml" />
	<link>http://radikalfx.com</link>
	<description>In full FX</description>
	<lastBuildDate>Tue, 27 Dec 2011 11:44:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Canonical Links: Google, Yahoo &amp; Microsoft working together</title>
		<link>http://radikalfx.com/2009/02/16/canonical-links-google-yahoo-microsoft-working-together/</link>
		<comments>http://radikalfx.com/2009/02/16/canonical-links-google-yahoo-microsoft-working-together/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 10:51:31 +0000</pubDate>
		<dc:creator>cra5h</dc:creator>
				<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://radikalfx.com/?p=31</guid>
		<description><![CDATA[It doesn&#8217;t happen very often, but every once in a while all the major search engines decide on something together. A week ago something like this happened and they decided on supporting canonical links in pages. Is this useful for you? That really depends on what you are doing on the web. But for example [...]]]></description>
			<content:encoded><![CDATA[<p>It doesn&#8217;t happen very often, but every once in a while all the major search engines decide on something together. A week ago something like this happened and they decided on supporting canonical links in pages.</p>
<p>Is this useful for you? That really depends on what you are doing on the web. But for example at my work this really helps a lot. At ilocal.nl we have different ways of linking to company detail pages. For example:<br />
<a href="http://www.ilocal.nl/WebDisplayServlet?iqk1=466448876390121&#038;iqf1=id&#038;tid=DetailsDisplay">http://www.ilocal.nl/WebDisplayServlet?iqk1=466448876390121&#038;iqf1=id&#038;tid=DetailsDisplay</a><br />
<a href="http://www.ilocal.nl/nl/restaurants/bistro-zilverzoen/290448876390948">http://www.ilocal.nl/nl/restaurants/bistro-zilverzoen/290448876390948</a></p>
<p>Above links contain exactly the same information. The only difference is that the first one is the old URL that we used to use. And then we switched to the second URL for SEO improvement. But /WebDisplayServlet links still get a lot of traffic from pages linking to them. </p>
<p>Now what you can do with canonical links is when the first URL is requested, add the following HTML in the head of the page:</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;link rel=&quot;canonical&quot; href=&quot;http://www.ilocal.nl/nl/restaurants/bistro-zilverzoen/290448876390948&quot;/&gt;</pre></div></div>

<p>This way all our friendly search crawlers can instantly recognize that it shouldn&#8217;t put this URL in it&#8217;s index, but use the canonical link. If the search engine then starts crawling the link provided here or if it&#8217;s using the data from this page, isn&#8217;t 100% clear to me. But if the page is accessed by the second URL then you should <strong>not</strong> put this canonical link in. So the crawler doesn&#8217;t try to look up a page that it&#8217;s already looking at.</p>
<p>One problem with this canonical link is that the content of the page should be the same or close to the same as the page that the crawler found the link on. But for ilocal what I would like to do is when a users searches for something. Then let the canonical link point to a static result page. For example if a user links to a search for &#8220;hotel zwembad&#8221; in &#8220;utrecht&#8221; (<a href="http://www.ilocal.nl/WebSearchServlet?iqk1=hotel+zwembad&#038;iqk3=utrecht&#038;point=&#038;sort=distance%3Aasc&#038;x=0&#038;y=0&#038;tid=NewSearch&#038;ips=10&#038;iv1=1&#038;loc=1&#038;irs=&#038;isf=priority&#038;iqk2=not+member&#038;iqf2=groupListing&#038;iv11=">link</a>). Let the canonical link, link to the rewritten results page for hotels in utrecht (<a href="http://www.ilocal.nl/rubriek/hotels/utrecht">link</a>). But in the <a href="http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html">blog post on google</a> about the canonical links it says the following:</p>
<blockquote><p><strong>Is it okay if the canonical is not an exact duplicate of the content?</strong><br />
We allow slight differences, e.g., in the sort order of a table of products. We also recognize that we may crawl the canonical and the duplicate pages at different points in time, so we may occasionally see different versions of your content. All of that is okay with us.</p></blockquote>
<p>So right now I will not provide a canonical link on the results pages of ilocal.nl, but it would be nice to also have a way to specify some sort of parent URL which you want crawlers to use instead of all the URL which is cluttered with refinements by users and other nasty parameters. It&#8217;s a good thing that in the next release of ilocal.nl we will remove a lot of defaulted parameters and this might help a bit as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://radikalfx.com/2009/02/16/canonical-links-google-yahoo-microsoft-working-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tomcat and if-modified-since header</title>
		<link>http://radikalfx.com/2008/03/23/what-to-do-with-google-seo-and-if-modified-since-header-in-your-servlet-jsp/</link>
		<comments>http://radikalfx.com/2008/03/23/what-to-do-with-google-seo-and-if-modified-since-header-in-your-servlet-jsp/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 10:25:54 +0000</pubDate>
		<dc:creator>cra5h</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Tomcat]]></category>

		<guid isPermaLink="false">http://radikalfx.com/2008/03/23/what-to-do-with-google-seo-and-if-modified-since-header-in-your-servlet-jsp/</guid>
		<description><![CDATA[If you ever had to do something with web pages that need to be ranked the highest as possible, then you&#8217;ve probably read through the Google Webmaster Guidelines. But when I did that, I came across the following line: Make sure your web server supports the If-Modified-Since HTTP header. This feature allows your web server [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever had to do something with web pages that need to be ranked the highest as possible, then you&#8217;ve probably read through the <a href="http://www.google.com/webmasters/guidelines.html" title="Google Webmaster Guidelines" target="_blank">Google Webmaster Guidelines</a>. But when I did that, I came across the following line:</p>
<blockquote><p>Make sure your web server supports the If-Modified-Since HTTP header. This feature allows your web server to tell Google whether your content has changed since we last crawled your site. Supporting this feature saves you bandwidth and overhead</p></blockquote>
<p>Because Tomcat&#8217;s default is to let the browser / crawler know that it doesn&#8217;t cache pages, GoogleBot will go and download the page every time it visits that page. In general this doesn&#8217;t have to be bad, but because the website I am working on contains a lot of pages in google (&gt;500.000) it might be wise to sometimes give this if-modified-since header back to Google and thereby spare some bandwidth and server load.</p>
<p>So then we need to take a look if GoogleBot gives back this header and then compare it and see if the information should be re crawled by Google. For this example I will be taking a period of 7 days. Of course, you could also let this depend on the data in your system. But the website I am working on makes it a bit difficult to do this, because looking up if there is new data, will slowdown the entire load process of the website (for each request), which is something I would like to avoid.</p>
<p>So how does the code look, to get this done:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #339933;">&lt;%</span>
<span style="color: #003399;">String</span> ifModifiedSince <span style="color: #339933;">=</span> request.<span style="color: #006633;">getHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;if-modified-since&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>ifModifiedSince <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #339933;">!</span>ifModifiedSince.<span style="color: #006633;">equals</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">try</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// Format should be something like this: Thu, 10 Jan 2008 09:20:50 GMT</span>
    <span style="color: #003399;">SimpleDateFormat</span> sdf <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">SimpleDateFormat</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;EEE, d MMMM yyyy HH:mm:ss z&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">Date</span> modifiedDate <span style="color: #339933;">=</span> sdf.<span style="color: #006633;">parse</span><span style="color: #009900;">&#40;</span>ifModifiedSince<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #003399;">Calendar</span> modifiedCal <span style="color: #339933;">=</span> <span style="color: #003399;">Calendar</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    modifiedCal.<span style="color: #006633;">setTime</span><span style="color: #009900;">&#40;</span>modifiedDate<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #003399;">Calendar</span> nowCal <span style="color: #339933;">=</span> <span style="color: #003399;">Calendar</span>.<span style="color: #006633;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000066; font-weight: bold;">long</span> sevenDays <span style="color: #339933;">=</span> <span style="color: #cc66cc;">604800000</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>modifiedCal.<span style="color: #006633;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> sevenDays <span style="color: #339933;">&gt;</span> nowCal.<span style="color: #006633;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getTime</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      response.<span style="color: #006633;">sendError</span><span style="color: #009900;">&#40;</span>HttpServletResponse.<span style="color: #006633;">SC_NOT_MODIFIED</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
  <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    e.<span style="color: #006633;">printStackTrace</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
response.<span style="color: #006633;">setHeader</span> <span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Cache-Control&quot;</span>, <span style="color: #0000ff;">&quot;max-age=604800&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 7 days in seconds</span>
response.<span style="color: #006633;">setDateHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Expires&quot;</span>,
<span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">+</span><span style="color: #cc66cc;">604800000</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// 7 days in milliseconds</span>
response.<span style="color: #006633;">setDateHeader</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Last-Modified&quot;</span>, <span style="color: #003399;">System</span>.<span style="color: #006633;">currentTimeMillis</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Now</span>
<span style="color: #339933;">%&gt;</span></pre></div></div>

<p>The code above should be enough to get the job done. But if you feel that this can be done better or easier, feel free to comment on this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://radikalfx.com/2008/03/23/what-to-do-with-google-seo-and-if-modified-since-header-in-your-servlet-jsp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

