1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Google ignoring htaccess? I'm shocked!

Discussion in 'Black Hat SEO' started by snowtgr, May 25, 2013.

  1. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1
    I've created dozens of sites and never had a problem like this. I recently created a few new sites and I have a problem with one of them.

    I use .htaccess to choose if I want www or not. Google always indexed the domain I chosen in htaccess (www or not www)

    I always use this htaccess file

    Code:
    RewriteBase /
    Options +FollowSymLinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^domain,net
    RewriteRule ^(.*)$ ht tp://www,domain,net/$1 [R=permanent,L]
    (used , instead of . in the code because BHW thinks I'm spamming...)

    However this time google indexed domain.net version and it should index www version LOL. How is this even possible?
     
  2. Stufferizer

    Stufferizer Regular Member

    Joined:
    Nov 6, 2012
    Messages:
    239
    Likes Received:
    74
    Did you build links to non-www?
    In any case I would just wait, it will probably change along your configuration soon :)
     
  3. KillerHeck

    KillerHeck Regular Member

    Joined:
    Apr 12, 2011
    Messages:
    239
    Likes Received:
    442
    You can also just add your website into google webmaster tool and specify you want the url to be displayed in google with www, that will definitely solve the issue!
     
  4. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1
    I didn't build any links yet. I never had such a problem. I'm surprised why it indexed non-www (because I use htaccess redirection)

    Maybe since new google algorithm changes the mighty google knows better if you need www or not ;D
     
  5. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1
    I decided to stay away from unnecessary google tools like (webmaster tools, analytics). I'm a black hatter and I hate unnecessary google software like the devil hates holy water. This should work with htaccess and it always worked for me on dozens of sites.
     
  6. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,066
    Likes Received:
    2,873
    Gender:
    Male
    Are you sure it works? I mean, typein your domain without www and see if it redirects to a www version. If you PM me your site url, I can have a look :)
     
  7. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1
    Sure it works. It redirects to the www version

    To be honest I place the correct htaccess file always immediately after buying a domain. Even a few seconds before I upload the website.
     
  8. Gogol

    Gogol Elite Member

    Joined:
    Sep 10, 2010
    Messages:
    3,066
    Likes Received:
    2,873
    Gender:
    Male
    Did you check the header and does it show permanent redirect? I have doubt coz I use [R=301,L] and not [R=permanent,L]. I am not saying it's wrong but I don't know if it is right...

     
  9. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1

    [R=301,L] as well as [R=permanent,L] are correct.


    It's the same thing

    Source ht tp://www,webmasterworld,com/forum92/1404.htm
     
  10. crashed

    crashed Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 13, 2008
    Messages:
    958
    Likes Received:
    1,198
    Occupation:
    Guru-slayer
    Location:
    Behind the VPN...
    Home Page:
    Two possiblities...

    a) There was a site previously on this domain without www.
    b) There are links going to it without the www.

    Whether you like it or not, the only easy fix is adding the site in webmaster tools and selecting to show search results with www.
     
    • Thanks Thanks x 1
  11. snowtgr

    snowtgr Newbie

    Joined:
    Oct 1, 2010
    Messages:
    28
    Likes Received:
    1

    Crashed great answer :) I bought a domain with history (expired in March 2013) and the site that was there was probably non-www. However I was not sure if this could be the reason.

    The domain was not indexed (checked using site: ) in google before I uploaded my site. I thought that google will read the new htaccess.

    Is there a way to check if a domain was using www or not in past? It wasn't in waybackmachine, and it had no backlink profile.
     
    Last edited: May 25, 2013