title: Subdomain Redirect Error + Htaccess, confused?
body: <p>I noticed several weeks ago, that my whole site was being mirrored by a strange subdomain in google search.</p>
  
  <p>Ex. www.site.com</p>
  
  <p>Being indexed in Google:</p>
  
  <p>www.site.comwww.site.com/index.html ==
  www.site.com/index.html</p>
  
  <p>www.site.comwww.site.com/contact ==
  www.site.com/contact</p>
  
  <p>etc ... the above pages are identical.</p>
  
  <p>Strange thing is any other subdomain you enter gets redirected to original.
  So www.anythinghere.site.com --redirects--> www.site.com</p>
  
  <p>2 questions:</p>
  
  <ol>
  <li>Specific code in htaccess that would redirect this URL (www.site.comwww.site.com) to the main site?</li>
  <li>How can I find how this subdomain got created in the first place?</li>
  </ol>
  
  <p>I've copied my htaccess so you can take a look ... I'm not the most technical person.</p>
  
  <p>Can anyone shed some light on this issue?  I think it is screwing around with my search rankings.</p>
  
  <p>===================</p>
  
  <pre><code>RewriteCond %{HTTP_HOST} !^www\.site\.com [NC]
  
  RewriteRule (.*) http://www.site.com/$1 [R=301,L]
  
   #wpfx seo
    RewriteCond %{HTTP_HOST} !^www..*
  
    RewriteCond %{HTTP_HOST} !^$
  
    RewriteCond %{HTTP_HOST} ^([^.]*).(com|com/)
  
    RewriteRule ^.*$ http://www.%1.%2%{REQUEST_URI} [R=301,L]
  
    RewriteCond %{REQUEST_FILENAME} !-f
  
    RewriteCond %{REQUEST_FILENAME} !-d
  
    RewriteRule ^(.*)$ /index.php?/$1 [L]
  </code></pre>