Close

Results 1 to 11 of 11
  1. #1
    DF VIP Member theodotcom's Avatar
    Join Date
    Jul 2001
    Location
    London
    Posts
    2,302
    Thanks
    242
    Thanked:        153
    Karma Level
    431

    Default wordpress and www./non www. question

    Is there anyway in wordpress to redirect if someone enters the domain without the www. to the www. domain.

    Using an iis6 server with plesk and it cant seem to be done in plesk, so was wondering if there was another way.

    the wordpress site doesnt display properly without the www. so need it to redirect.

    Thanks for any advice.

  2. #2
    DF VIP Member
    Zoots's Avatar
    Join Date
    Oct 2010
    Location
    Hoth
    Posts
    3,329
    Thanks
    1,648
    Thanked:        1,321
    Karma Level
    413

    Default Re: wordpress and www./non www. question


  3. #3
    DF VIP Member miffy's Avatar
    Join Date
    Mar 2005
    Location
    Manchester
    Posts
    1,533
    Thanks
    21
    Thanked:        57
    Karma Level
    325

    Default Re: wordpress and www./non www. question

    You want to have have a look into Cannonicalisation which is what this is called.

    You basically need to have a 301 redirect from a non www. to a www.

    Im not sure how to do it on a iis server but a quick check found these instructions.

    Under your parent domain in iis, create another website with example.com as the host name and then right click on it> select properties> Select Directory> A redirection to a URL> enter http://www.example.com$S$Q> Select "Exact URL">Select "A permanent redirection"> click ok
    You're done!

  4. #4
    DF VIP Member theodotcom's Avatar
    Join Date
    Jul 2001
    Location
    London
    Posts
    2,302
    Thanks
    242
    Thanked:        153
    Karma Level
    431

    Default Re: wordpress and www./non www. question

    Thanks for the help

    Zoots neither of the 2 worked but thanks anyway
    miffy instructions seem a bit confusing because in plesk/on server the directory is without the www.

  5. #5
    DF VIP Member
    Zoots's Avatar
    Join Date
    Oct 2010
    Location
    Hoth
    Posts
    3,329
    Thanks
    1,648
    Thanked:        1,321
    Karma Level
    413

    Default Re: wordpress and www./non www. question

    I saw something along those lines mentioned when I was Googling. If I remember right, I googled 'redirect in Plesk for non www' and there were quite a few results.

    How about this?

  6. #6
    DF VIP Member theodotcom's Avatar
    Join Date
    Jul 2001
    Location
    London
    Posts
    2,302
    Thanks
    242
    Thanked:        153
    Karma Level
    431

    Default Re: wordpress and www./non www. question

    Seen and tried that site, searched through so many sites in google however didnt find an answer, my hosting company tried and failed, and cant help anymore as they dont really offer support other than hardware issues. They tried the .htaccess file and also advised that plesk takes control so its unlikely to work with .htaccess.
    I'm at a total loss with this, why is it something thats so difficult.

  7. #7
    DF VIP Member miffy's Avatar
    Join Date
    Mar 2005
    Location
    Manchester
    Posts
    1,533
    Thanks
    21
    Thanked:        57
    Karma Level
    325

    Default Re: wordpress and www./non www. question

    have you tired this out in your htacess


    #non-www to www start
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www\.YOURSITEHERE.com/ $
    RewriteRule (.*) http://www.YOURSITEHERE.com/$1 [R=301,L]
    #non-www to www end

  8. #8
    DF VIP Member miffy's Avatar
    Join Date
    Mar 2005
    Location
    Manchester
    Posts
    1,533
    Thanks
    21
    Thanked:        57
    Karma Level
    325

    Default Re: wordpress and www./non www. question

    If you cant do it in the htaccess maybe change the way your linking to your style sheet?

    by default in the header.php file it is in there as

    PHP Code:
    <link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo'stylesheet_url' ); ?>" />
    maybe if you change it to, this might work?

    PHP Code:
    <link rel="stylesheet" type="text/css" media="all" href="http://www.yoursite.com" /> 

  9. #9
    DF VIP Member theodotcom's Avatar
    Join Date
    Jul 2001
    Location
    London
    Posts
    2,302
    Thanks
    242
    Thanked:        153
    Karma Level
    431

    Default Re: wordpress and www./non www. question

    I tried adding a .htaccess file in several ways but it didnt work, I couldnt find a .htaccess file anywhere so had to create it. From what I read I put it in the root directory and that should be it?

    Havent tried changing the header.php, will try that in a bit. Thanks again

  10. #10
    DF VIP Member miffy's Avatar
    Join Date
    Mar 2005
    Location
    Manchester
    Posts
    1,533
    Thanks
    21
    Thanked:        57
    Karma Level
    325

    Default Re: wordpress and www./non www. question

    How did you get on?

  11. #11
    DF VIP Member theodotcom's Avatar
    Join Date
    Jul 2001
    Location
    London
    Posts
    2,302
    Thanks
    242
    Thanked:        153
    Karma Level
    431

    Default Re: wordpress and www./non www. question

    Called my hosting company again and managed to get through to someone with a brain, he advised that the .htaccess is more for linux systems as plesk tends to override it, however there is a way to do it because a lot of customers need it done especially when they use ssl certificates.
    He sent me a guide to do it through iis manager, which worked fine.

Similar Threads

  1. redirect question
    By Psychoschiz in forum Web Hosting & Domain Names
    Replies: 2
    Last Post: 26th September 2002, 04:09 PM
  2. Quick Saturn question
    By doughboy in forum Old Skool Gaming & Retro
    Replies: 1
    Last Post: 16th September 2002, 02:19 AM
  3. Xbox DVD Rom question
    By nims076 in forum Microsoft Consoles
    Replies: 12
    Last Post: 1st September 2002, 04:21 PM
  4. 5210 question
    By miniboot in forum Unlocking Questions & Solutions
    Replies: 1
    Last Post: 29th August 2002, 12:36 PM
  5. Decorating Question
    By Roty in forum The Dog and Duck
    Replies: 6
    Last Post: 28th August 2002, 11:36 AM

Social Networking Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •