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

Problem with www and http

Discussion in 'Black Hat SEO' started by parasitus84, Feb 11, 2013.

  1. parasitus84

    parasitus84 Regular Member

    Joined:
    Apr 28, 2011
    Messages:
    288
    Likes Received:
    42
    When backlinking my new website I was making sure that I pick one domain and I picked the root domain: hxxp://site.com. Everything was fine till I got one service from this forum and the guy used wrong details for it (hxxp://www.site.com). Since then everytime I put the address in the address bar the name automatically changes to www.site.com and then back to site.com. Can this influence my SEO and if yes should I redirect those links somehow?

    Thanks!
     
  2. evilclown

    evilclown Senior Member

    Joined:
    Jul 31, 2012
    Messages:
    805
    Likes Received:
    575
    Occupation:
    Party Clown
    Location:
    Clownville
    Just fix your .htaccess file

    Code:
    RewriteEngine On
    RewriteBase /
    
    # Rewrite www.domain.com -> domain.com 
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^example-domain-please-change\.com [NC]
    RewriteRule (.*) http://example-domain-please-change.com/$1 [R=301,L]
    #
    # or for the opposite domain.com -> www.domain.com use the following
    # DO NOT USE BOTH
    #
    #RewriteCond %{HTTP_HOST} .
    #RewriteCond %{HTTP_HOST} !^www\.domain\.com [NC]
    #RewriteRule (.*) http://www.domain.com/$1 [R=301,L]
    
    Don't worry about the links, it's good now for diversification. Just change the domain add to .htaccess problem solved.
     
    • Thanks Thanks x 3
  3. innozemec

    innozemec Jr. VIP Jr. VIP

    Joined:
    Aug 19, 2011
    Messages:
    5,290
    Likes Received:
    1,799
    Location:
    www.Indexification.com
    Home Page:
    nothing to worry about.. simply put the htaccess Evilclown pasted..
     
    • Thanks Thanks x 1
  4. pitbulllopez

    pitbulllopez Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 19, 2012
    Messages:
    1,085
    Likes Received:
    45
    is your problem solved mate??
     
    • Thanks Thanks x 1
  5. parasitus84

    parasitus84 Regular Member

    Joined:
    Apr 28, 2011
    Messages:
    288
    Likes Received:
    42
    Thanks so much guys! I'm getting a little bit mixed-up with replacing the links (http and www) in the example given above. Do I have to use http:// at all?
     
  6. evilclown

    evilclown Senior Member

    Joined:
    Jul 31, 2012
    Messages:
    805
    Likes Received:
    575
    Occupation:
    Party Clown
    Location:
    Clownville
    Very simple, don't get confuse. Don't replace any link or change anything. Just update your .htaccess file in your host with this few lines. Of course change the domain for yours. And that's it. When you type www.yoursite.com it will redirect to yoursite.com. All the links you generated are ok and won't loose any value.

    If you don't know what to do with the .htaccess file, just talk to your host support department. They will help you very quickly.

    Now if you are using WP as your engine just change on your settings your site url and use http://yoursite.com it will update your .htaccess for you.
     
    • Thanks Thanks x 1
    Last edited: Feb 11, 2013
  7. parasitus84

    parasitus84 Regular Member

    Joined:
    Apr 28, 2011
    Messages:
    288
    Likes Received:
    42
    Would this be ok?


    I'm getting confused with the special characters like $ etc.

    I also have this in my .htaccess:

    Do I delete this?

    Thanks!
     
    Last edited: Feb 11, 2013
  8. evilclown

    evilclown Senior Member

    Joined:
    Jul 31, 2012
    Messages:
    805
    Likes Received:
    575
    Occupation:
    Party Clown
    Location:
    Clownville
    Just go to wordpress >> settings >> general

    under WordPress URL and Site URL make them http://mybestdomain.com both of the fields and click save. WP will update this directly for you. No other setting needed.
     
  9. zxlk21e

    zxlk21e Junior Member

    Joined:
    Jul 25, 2008
    Messages:
    113
    Likes Received:
    20
    Looks like the code should be OK. And this shouldn't really impact your SEO - google deals with this crap all the time. I mean, it's not optimal, but I wouldn't expect to be slapped or something because of it. It is however, bad for user experience.
     
    • Thanks Thanks x 1
  10. parasitus84

    parasitus84 Regular Member

    Joined:
    Apr 28, 2011
    Messages:
    288
    Likes Received:
    42
    I've never changed them and both of them have always been http://mybestdomain.com.

    Do I still need the .htaccess code then?
    Thanks!
     
  11. evilclown

    evilclown Senior Member

    Joined:
    Jul 31, 2012
    Messages:
    805
    Likes Received:
    575
    Occupation:
    Party Clown
    Location:
    Clownville
    Send me a PM with your URL if you don't mind I'll take a quick look. You might not need it, you might be using all in one and could be doing a redirect.
     
  12. the_demon

    the_demon Jr. Executive VIP

    Joined:
    Nov 23, 2008
    Messages:
    3,177
    Likes Received:
    1,563
    Occupation:
    Search Engine Marketing
    Location:
    The Internet
    If the content is the same on both domains, it makes no difference. Google is excellent at understanding they are on in the same... That is unless you are serving up different content for www and no www.

    You can also set your preference in webmaster tools.
     
    • Thanks Thanks x 1
  13. parasitus84

    parasitus84 Regular Member

    Joined:
    Apr 28, 2011
    Messages:
    288
    Likes Received:
    42
    Ok, many thanks, guys. Problem solved, I guess ;)