1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

301 redirect from www to non-www?

Discussion in 'Site & Server Administration' started by TrinityZey, Dec 10, 2012.

  1. #1
    I run a test on one of my sites, and I got this report:

    How can I fix this using Cpanel?
    SEMrush
     
    TrinityZey, Dec 10, 2012 IP
    SEMrush
  2. VAT

    VAT Greenhorn

    Messages:
    2
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #2
    Have you this code at the top of your .htaccess file?

    
    [COLOR=#ff0000]RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example.com
    RewriteRule (.*) http://www.example.com/$1 [R=301,L][/COLOR]
    Code (markup):
     
    VAT, Dec 12, 2012 IP
    TrinityZey likes this.
  3. santosh.vouch45

    santosh.vouch45 Greenhorn

    Messages:
    124
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    Right the above code can be use for 301 redirect www to non www. it is permanent movement of old domain site to new domain.
     
    santosh.vouch45, Dec 13, 2012 IP
  4. TrinityZey

    TrinityZey Active Member

    Messages:
    258
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #4
    But is there a way I can set it all up through Cpanel, or Godaddy, without going to each individual site's .htaccess file, and add the code?
     
    TrinityZey, Dec 13, 2012 IP
  5. abraxas

    abraxas Well-Known Member

    Messages:
    1,422
    Likes Received:
    44
    Best Answers:
    1
    Trophy Points:
    125
    #5
    You should can through Cpanel, still you will have to modify the .htaccess of each site you want to redirect...though I an not a Godaddy client.
    It is very good idea to do it since it isn't already. Which version of the URL is up to you - it wont make any difference for the SEs.

    Just open the .htaccess from the cpanel and add the code mentioned above, while replacing the details with yours. Also it is a good idea to redirect and the index.html/php or whatever to the domain. This way from all the 4 versions you will have just 1 of your choice.
     
    abraxas, Dec 16, 2012 IP
  6. Oly

    Oly Greenhorn

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    6
    #6
    You can also log into webmaster tools and tell google to only use the www version or the other way around.
     
    Oly, Dec 16, 2012 IP
  7. Enspiegel

    Enspiegel Peon

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #7
    I think you have to set it for each of your website up in its .htaccess file. I do not know any other way to change it for tens of websites by the only simple step.
     
    Enspiegel, Dec 16, 2012 IP
  8. TrinityZey

    TrinityZey Active Member

    Messages:
    258
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #8
    I'm actually wondering if this has anything to do with google rankings?

    Does google actually do anything to the rankings if you don't redirect the WWW?
     
    TrinityZey, Jan 12, 2013 IP
  9. Sensei.Design

    Sensei.Design Prominent Member

    Messages:
    3,849
    Likes Received:
    162
    Best Answers:
    0
    Trophy Points:
    310
    Digital Goods:
    1
    #9
    It doesn't affect rankings if you use your domain name with or without www.
     
    Sensei.Design, Jan 13, 2013 IP