www and without www problem

by YongC
5 replies
  • WEB DESIGN
  • |
Hi guy !

I'm using domain without www and when i search site:mysite.com and google return my site but when i try site:www.mysite.com i have no result, anyone know what's happened ?

Thank for help !
#problem #www
  • Profile picture of the author Edge360
    I would check your .htaccess file, can you show us if there is one in your FTP?
    {{ DiscussionBoard.errors[8488002].message }}
    • Profile picture of the author YongC
      Originally Posted by Edge360 View Post

      I would check your .htaccess file, can you show us if there is one in your FTP?
      Here is the .htaccess code that i using

      RewriteEngine On
      RewriteBase /
      RewriteCond %{HTTP_HOST} ^www\.mysite\.com [NC]
      RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
      {{ DiscussionBoard.errors[8488015].message }}
      • Profile picture of the author RobinInTexas
        Originally Posted by YongC View Post

        Here is the .htaccess code that i using

        RewriteEngine On
        RewriteBase /
        RewriteCond %{HTTP_HOST} ^www.mysite.com [NC]
        RewriteRule ^(.*)$ http://mysite.com/$1 [L,R=301]
        I'm thinking the third line should be

        RewriteCond %{HTTP_HOST} ^www\.mysite\.com$ [NC]

        not certain how the missing $ affects things.
        Signature

        Robin



        ...Even if you're on the right track, you'll get run over if you just set there.
        {{ DiscussionBoard.errors[8488252].message }}
        • Profile picture of the author YongC
          Originally Posted by UMS View Post

          This is not a problem, it's exactly what you want. Google has indexed the version of the site you do the 301 redirect to.

          By the way, you don't have a design question. Should have been posted in Adsense / PPC / SEO Discussion Forum
          Thank for help UMS


          Originally Posted by RobinInTexas View Post

          I'm thinking the third line should be

          RewriteCond %{HTTP_HOST} ^www.mysite.com$ [NC]

          not certain how the missing $ affects things.
          Thank you RobinInTexas
          {{ DiscussionBoard.errors[8491100].message }}
  • Profile picture of the author UMS
    This is not a problem, it's exactly what you want. Google has indexed the version of the site you do the 301 redirect to.

    By the way, you don't have a design question. Should have been posted in Adsense / PPC / SEO Discussion Forum
    {{ DiscussionBoard.errors[8488204].message }}

Trending Topics