Need both www and non www url's working in wordpress ...

Discussion in 'WordPress' started by SIVAJI, Aug 9, 2009.

  1. #1
    I need both www and non www url's working in blog.

    What should i do to get that ?
     
    SIVAJI, Aug 9, 2009 IP
  2. vagrant

    vagrant Peon

    Messages:
    2,284
    Likes Received:
    181
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Unless you need them both to show as different blogs with different content, it would be better to redirect non www to www using a variation of the code below in your .htaccess to suit the domain.

    Options +FollowSymLinks  
    RewiteEngine On 
    RewrieCond %{HTTTP_HOST} ^yourdmain\.com$$ [NC]
    Rewriteule ^(.*)$  http://www.yourdomain.com/$1 [R=301,L] 		
    Code (markup):

    if word-press Enforce www. Preference may be of help.

    Also in google webmaster tools remember to set your preferred domain, see
    http://www.google.com/support/webmasters/bin/answer.py?answer=44231&topic=9025 for more on how to do that.
     
    vagrant, Aug 9, 2009 IP
  3. dynashox

    dynashox Premium Member Staff

    Messages:
    8,662
    Likes Received:
    563
    Best Answers:
    3
    Trophy Points:
    335
    #3
    For SEO purpose, it's better for you to use only one option, either using www OR non www.

    To redirect non www to www in Wordpress, go to Settings >> General. Add www for WordPress address (URL) and it will redirect to www afterward.

    - Dynashox -
     
    dynashox, Aug 10, 2009 IP
  4. villan

    villan Active Member

    Messages:
    569
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    85
    #4
    I need to access both www and non www .

    what code can i add and where .. ?
     
    villan, Aug 11, 2009 IP