<?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>The SEO Blogger&#187; urls</title>
	<atom:link href="http://theseoblogger.com/tag/urls/feed/" rel="self" type="application/rss+xml" />
	<link>http://theseoblogger.com</link>
	<description>^~_ Rising Through the Search Engines _~^</description>
	<lastBuildDate>Mon, 14 Dec 2009 03:20:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using Mod-rewrite to Redirect Non-www URL to www URL</title>
		<link>http://theseoblogger.com/seo-links/seo-url-tip-www-and-non-www/</link>
		<comments>http://theseoblogger.com/seo-links/seo-url-tip-www-and-non-www/#comments</comments>
		<pubDate>Sat, 05 May 2007 00:06:13 +0000</pubDate>
		<dc:creator>SEO Blogger</dc:creator>
				<category><![CDATA[SEO Links]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[linking]]></category>
		<category><![CDATA[mod-rewrite]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[urls]]></category>

		<guid isPermaLink="false">http://theseoblogger.com/seo-links/seo-url-tip-www-httpwww-and-non-www-http-are-different/</guid>
		<description><![CDATA[Did you know the URLs &#8220;www.The SEO Blogger.com&#8221; and &#8220;http://The SEO Blogger.com&#8221; are distinct URLs and are treated differently by the search engines? 
This has to do with URL canonicalization. What&#8217;s URL canonicalization you ask?
According to the head of Google&#8217;s Webspam team, Matt Cutts, URL canonicalization is &#8220;the process of picking the best url when [...]]]></description>
			<content:encoded><![CDATA[<p>Did you know the URLs &#8220;www.The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>&#8221; and &#8220;http://The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>&#8221; are distinct URLs and are treated differently by the search engines? </p>
<p>This has to do with URL canonicalization. <strong>What&#8217;s URL canonicalization you ask?</strong><span id="more-16"></span></p>
<p>According to the head of Google&#8217;s Webspam team, <a href="http://www.mattcutts.com/blog/seo-advice-url-canonicalization/">Matt Cutts</a>, URL canonicalization is &#8220;the process of picking the best url when there are several choices&#8221;:</p>
<p>    * www.The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a> (same as <a href="http://www.The" title="http://www.The" class="autohyperlink" target="_blank">www.The</a> SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>)<br />
    * The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a> (same as http://The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>)<br />
    * www.The SEO <a href="http://Blogger.com/index.php" title="http://Blogger.com/index.php" class="autohyperlink" target="_blank">Blogger.com/index.php</a><br />
    * The SEO <a href="http://Blogger.com/home.asp" title="http://Blogger.com/home.asp" class="autohyperlink" target="_blank">Blogger.com/home.asp</a></p>
<p>Most people think that those are the same, but on technical term, they are NOT! </p>
<p><em>*Can you see how the URLs are different, even though they may serve up the same web page? </em></p>
<p>Luckily, after a major update to &#8220;Big Daddy,&#8221; Google now is able to detect which one is the best URL for you/your website. However, you do have to help Big Daddy in the process. </p>
<p><strong>How do you help make sure Google pick the URL that you want?</strong></p>
<p>Well, for your internal linking, the URL that you use should be &#8216;consistent&#8217;. For example, if I&#8217;m planning to use &#8220;http://The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>&#8221; as the consistent URL form for all of my EXTERNAL inbound links, it&#8217;s wise to use that URL form in ALL my internal linkings, as well. And, as you can see, I have done just that.</p>
<p>*Note: the reason you don&#8217;t want to have half of your links pointing to &#8220;http://yourdomain.com&#8221; and the other half to &#8220;http://www.yourdomain.com&#8221; is because you do NOT want to split the value of those links up. You want to have one &#8216;consistent&#8217; URL form, so that your website (page rank) will receive the FULL benefits of ALL the links, not just HALF of them.</p>
<p>&#8211;But here&#8217;s the problem, you only have control over the URL form of those external/internal links if you are the one who&#8217;s placing those links (URL form). For many other people who link to your website, you cannot control which URL forms (http://www. or http://) they will link to you. </p>
<p>Thus, in order to receive FULL benefit of consistent URL, you need to set up a 301 permanent redirect from one URL form to another, which is pretty easy&#8211;as shown below:</p>
<p>
<strong>Using Mod Rewrite to Redirect &#8220;Non-www&#8221; URL (<em>http://</em>) to &#8220;www&#8221; URL (<em>http://www.</em>)</strong></p>
<p>In order to do this, you must have access to the <strong>.htaccess </strong> file via FTP or CPanel File Manager. Most Apache web server (Linux hosting) has this .htaccess file. If not, you can create and name the new file <em>.htaccess</em> and place it inside the root directory of your domain (e.g. public_html/.htaccess).</p>
<p>You must edit/add the following mod-rewrite script to your .htaccess file to redirect &#8220;http://&#8221; to &#8220;http://www.&#8221;:</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} !^www..*<br />
RewriteCond %{HTTP_HOST} !^$<br />
RewriteCond %{HTTP_HOST} ^([^.]*).(com|com/)<br />
RewriteRule ^.*$ <a href="http://www.%1.%2%" title="http://www.%1.%2%" class="autohyperlink" target="_blank">www.%1.%2%</a>{REQUEST_URI} [R=301,L]</p>
<p>The above script will redirect:</p>
<p align="center"><em>http://yourdomain.com</em> to <em>http://www.yourdomain.com</em></p>
<p></p>
<p><strong>Redirecting &#8220;www&#8221; URL (<em>http://www.</em>) to &#8220;Non-www&#8221; URL (<em>http://</em>)</strong></p>
<p>This is the simple mod rewrite script I use to redirect &#8220;<em>http://www.The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a></em>&#8221; to &#8220;<em>http://The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a></em>&#8220;:</p>
<p>RewriteEngine On<br />
RewriteCond %{HTTP_HOST} ^www.TheSEOBlogger.com [nc]<br />
RewriteRule (.*) <a href="http://TheSEOBlogger.com/$1" title="http://TheSEOBlogger.com/$1" class="autohyperlink" target="_blank">TheSEOBlogger.com/$1</a> [R=301,L]</p>
<p><strong>*Note: you should change &#8220;The SEO <a href="http://Blogger.com" title="http://Blogger.com" class="autohyperlink" target="_blank">Blogger.com</a>&#8221; to YOUR WEBSITE NAME!</strong> Also, if you have sub-domains, the above script will also work. Also, by &#8216;default&#8217;, I think WordPress gives your site URL as &#8220;http://www.yoursite.com.&#8221; If you want your site to be in &#8220;http://&#8221; URL form, you, of course, have to go to &#8220;OPTION ->General&#8221; and update your site URL to &#8220;http://yoursite.com&#8221; instead of &#8220;http://www.yoursite.com.&#8221;</p>
<p>Anyway, here is a live demo of those two scripts at work:</p>
<p><a href="http://mint-tree.com">http://mint-tree.com</a> >>> <a href="http://www.mint-tree.com" title="http://www.mint-tree.com" class="autohyperlink" target="_blank">www.mint-tree.com</a><br />
<a href="http://www.theseoblogger.com">http://www.TheSEOBlogger.com</a> >>> <a href="http://TheSEOBlogger.com" title="http://TheSEOBlogger.com" class="autohyperlink" target="_blank">TheSEOBlogger.com</a></p>
<p>By using either one of these mod-rewrite scripts, you can have a consistent URL in your linking campaign. Now, you don&#8217;t have to worry what URL form others have used to link to your website. Now &#8220;http://&#8221; and &#8220;http://www.&#8221; are &#8216;consistently&#8217; the same, although I think &#8220;http://&#8221; is a better URL form for your SEO linking campaign, just because that form is SHORTER than &#8220;http://www.&#8221;  <img src='http://theseoblogger.com/wordpress/wp-includes/images/smilies/icon_razz.gif' alt=':razz:' class='wp-smiley' />  .</p>
Similar Posts:<ul>None Found</ul><!-- POC cache miss: 0.387 ms -->]]></content:encoded>
			<wfw:commentRss>http://theseoblogger.com/seo-links/seo-url-tip-www-and-non-www/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

