www. in WP

Discussion in 'WordPress' started by KeywordsandCopy, Jan 31, 2008.

  1. #1
    hey all-

    Installing a few new WP blogs today, and had a question about how to redirect everything to a www. address.

    In other words, I want www.sample.com not sample.com...

    Im sure this is easy, but Im lost!

    Thanks in advance.
     
    KeywordsandCopy, Jan 31, 2008 IP
  2. mikemdg

    mikemdg Member

    Messages:
    68
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #2
    Under Options - WordPress address (URL):
     
    mikemdg, Jan 31, 2008 IP
  3. KeywordsandCopy

    KeywordsandCopy Peon

    Messages:
    570
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #3
    mikemdg - sounds good!

    So all I have to do is add the "www" where it says WordPress Address and Blog Address? That will make sure everything points to the "www" for SEO purposes?

    Thanks in advance!
     
    KeywordsandCopy, Jan 31, 2008 IP
  4. nicogarcia

    nicogarcia Well-Known Member

    Messages:
    258
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    110
    #4
    yup. i just did it.
    WP Dashboard -> Options -> Wordpress URL

    Because you can have a subdomain like forums.sample.com and blog.sample.com
    In case you have blog.sample.com you must create a subdomain first.

    Good luck with your blog.

    Btw. I hope you enjoy mine... www.CanCanBlog.com - its about innovative promotion techniques
     
    nicogarcia, Jan 31, 2008 IP
  5. Pixelrage

    Pixelrage Peon

    Messages:
    5,083
    Likes Received:
    128
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Pixelrage, Jan 31, 2008 IP
  6. gr8liverpoolfan

    gr8liverpoolfan Notable Member

    Messages:
    6,719
    Likes Received:
    538
    Best Answers:
    0
    Trophy Points:
    285
    #6
    A 301 redirect by adding the following code to your htaccess should solve the problem.

    RewriteEngine on
    RewriteCond %{HTTP_HOST} ^yourdomain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [R=301,L]

    To see whether the code did work, test it by typing the non www version, it should resolve to the www version.
     
    gr8liverpoolfan, Jan 31, 2008 IP
  7. KeywordsandCopy

    KeywordsandCopy Peon

    Messages:
    570
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #7
    liverpoolfan - Thanks for the code. Do I need to do this in addition to changing it in the Wordpress dashboard? Or can I just make teh WP change and forget adding the code to htaccess?
     
    KeywordsandCopy, Feb 1, 2008 IP
  8. mann3r

    mann3r Peon

    Messages:
    1,416
    Likes Received:
    100
    Best Answers:
    0
    Trophy Points:
    0
    #8
    better implement what gr8liverpoolfan said, in this way you will not be messing up with WP code. place that on .htaccess before that WP generated .htaccess code
     
    mann3r, Feb 1, 2008 IP
  9. microbrain

    microbrain Banned

    Messages:
    1,079
    Likes Received:
    100
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Once I redirected my site without www. and all of my blog pages got deindexed in google !!
     
    microbrain, Feb 1, 2008 IP