<?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>#if debug &#187; permanent redirect</title>
	<atom:link href="http://ifdebug.com/tag/permanent-redirect/feed/" rel="self" type="application/rss+xml" />
	<link>http://ifdebug.com</link>
	<description>Technical thoughts of a coffee addicted developer</description>
	<lastBuildDate>Fri, 16 Sep 2011 13:18:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Changing Temporary (302) To Permanent (301) Redirects</title>
		<link>http://ifdebug.com/changing-temporary-302-to-permanent-301-redirects/</link>
		<comments>http://ifdebug.com/changing-temporary-302-to-permanent-301-redirects/#comments</comments>
		<pubDate>Mon, 26 May 2008 08:10:35 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Search]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[302]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google search]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[permanent redirect]]></category>
		<category><![CDATA[temporary redirect]]></category>

		<guid isPermaLink="false">http://ifdebug.com/?p=59</guid>
		<description><![CDATA[It&#8217;s common place to register multiple variations of a domain to protect the brand or product that the domain is related to. At some point, a web master must choose what he or she is going to do with the &#8230; <a href="http://ifdebug.com/changing-temporary-302-to-permanent-301-redirects/">Continue reading <span class="meta-nav">&#8594;</span></a>


No related posts.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s common place to register multiple variations of a domain to protect the brand or product that the domain is related to. At some point, a web master must choose what he or she is going to do with the variations, the normal choices are:</p>
<ul>
<li>Do nothing, simply owning them is sufficient</li>
<li>Set them up, alias them so the site content is accessible via any of the variations</li>
<li>Set them up and redirect the variations to the primary domain</li>
</ul>
<p>This post is going to discuss the third option, as I have recently seen what I&#8217;d consider strange results in that space.</p>
<h2>Setting The Scene</h2>
<p>Imagine you sell Product A and you have a web site at http://producta.com. For three years http://producta.com has been used as the main web site, however in an exercise for brand consistency &#8211; you opt to move the web site to http://brandproducta.com.</p>
<p>The change of domain is handled using a temporary redirect and is successful. Soon after the move, http://producta.com is no longer visible in the search engines and has been replaced with http://brandproducta.com.</p>
<h2>Weirdness</h2>
<p>As a clean up exercise, I recently went through and updated the redirects on the domain variations (including http://producta.com) to use permanent (301) redirects. At the time, I didn&#8217;t think I&#8217;d see any changes in the search engine result pages, as http://producta.com hasn&#8217;t been in use for quite some time and all that was changing was a temporary (302) redirect into a permanent (301) redirect.</p>
<p>What has happened is that a brand+producta search term which would have returned http://brandproducta.com as the first listing, is now sharing that space with http://producta.com. Since that domain hasn&#8217;t been in use for such a long time, Google are using the results from DMOZ for the title and snippet.</p>
<h2>Explanation</h2>
<p>I&#8217;ve read through the information that Matt Cutts provided when he <a href="http://www.mattcutts.com/blog/seo-advice-discussing-302-redirects/">discussed 302 redirects</a> back in January 2006. There is a lot of good information on that page and also the previously linked article about URL canonicalisation &#8211; however nothing that I felt described what I have outlined above.</p>
<p>What I think has happened is that the temporariness of the 302 redirect has kicked in. Google have been seeing the 302 redirect from http://producta.com into http://brandproducta.com for quite some time and have been checking it periodically since it was temporary. When something changed (hence temporary) &#8211; Google kicked back into gear and displayed the results from http://producta.com.</p>
<p>Since it is now showing a 301 permanently moved redirect, I suspect that within a short amount of time Google will remove the listing for http://producta.com and it&#8217;ll be replaced by http://brandproducta.com.</p>
<p>I&#8217;d love to hear from someone if they have a more comprehensive answer on the results I&#8217;ve seen.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://ifdebug.com/changing-temporary-302-to-permanent-301-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ASP.NET Permanent (301) Redirect</title>
		<link>http://ifdebug.com/aspnet-permanent-301-redirect/</link>
		<comments>http://ifdebug.com/aspnet-permanent-301-redirect/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 13:07:05 +0000</pubDate>
		<dc:creator>Alistair</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[ASP.NET]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[permanent redirect]]></category>

		<guid isPermaLink="false">http://ifdebug.com/?p=49</guid>
		<description><![CDATA[Within ASP.NET, the System.Web.HttpResponse class providers a method to handle HTTP redirects, aptly named Redirect. The Redirect method has two overloads: Redirect (string) Redirect (string, bool) The former accepts a string representation of the URI that you&#8217;d like to redirect &#8230; <a href="http://ifdebug.com/aspnet-permanent-301-redirect/">Continue reading <span class="meta-nav">&#8594;</span></a>


No related posts.]]></description>
			<content:encoded><![CDATA[<p>Within ASP.NET, the <a href="http://msdn2.microsoft.com/en-us/library/system.web.httpresponse.aspx"><code>System.Web.HttpResponse</code></a> class providers a method to handle HTTP redirects, aptly named <a href="http://msdn2.microsoft.com/en-us/library/system.web.httpresponse.redirect.aspx"><code>Redirect</code></a>. The <code>Redirect</code> method has two overloads:</p>
<ul>
<li><code>Redirect (string)</code></li>
<li><code>Redirect (string, bool)</code></li>
</ul>
<p>The former accepts a string representation of the URI that you&#8217;d like to redirect to. The latter accepts the string URI and a boolean indicating whether you want ASP.NET to stop processing the request immediately or to continue throughout the life cycle of the request.</p>
<p>Unless you&#8217;re a HTTP junkie or you&#8217;ve had a specific reason to issue a permanent redirect (reorganising a web site is a prime candidate), you can be forgiven for not realising that the <code>Redirect</code> method issues a temporary redirect (HTTP 302). Not having needed to issue a permanent redirect through ASP.NET before, I assumed (there is that word again) that there would be additional overloads to handle both temporary (HTTP 302) and permanent (HTTP 301) redirects or optionally another method; I was wrong.</p>
<p>To issue a HTTP 301 permanent redirect through ASP.NET, you need to do a little bit of manual labour; don&#8217;t worry it&#8217;s only two lines of code:</p>
<ul>
<li><code>Response.Status = "301 Permanently Moved";</code></li>
<li><code>Response.AppendHeader ("Location", URI);</code></li>
</ul>
<p>At this point, so long as nothing else interferes with the response &#8211; the client will receive a standard run of the mill 301 HTTP permanent redirect. If you know or are worried that something following the above lines may modify the response, you can issue an optional <code>Response.End()</code> as the third line to make it take effect immediately.</p>


<p>No related posts.</p>]]></content:encoded>
			<wfw:commentRss>http://ifdebug.com/aspnet-permanent-301-redirect/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

