1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Automatically add www to naked domain

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by yoannb, May 30, 2012.

  1. yoannb

    yoannb Guest

    0
     
    I would like to a domain automatically redirected to www when entering it in without a prefix in the browser.
    How can i do this?

    Thank You
     
  2. Mickael Salfati

    Mickael Salfati Regular Pleskian

    27
     
    Joined:
    Apr 6, 2009
    Messages:
    178
    Likes Received:
    1
    Hi,

    There is no connection with Plesk here, you can obtain this result with a simple .htacces file and appropriated rewrite rules. Google is your friend, you'll find answer quickly ;)
     
  3. yoannb

    yoannb Guest

    0
     
    not exactly my solution, but thx

    The .htaccess file is rewritten automatically by my ecommerce solution.
    It works fine, the problem occurs when i go directly to a sub-directory.
    I tried putting the htaccess file there but it doesn't work.
    that's why I was hoping for a dns related solution...
     
  4. bizzehdee

    bizzehdee New Pleskian

    13
    60%
    Joined:
    Nov 6, 2011
    Messages:
    12
    Likes Received:
    0
    this is something i had a problem with so i came up with a mod_rewrite rule list for htaccess that i just set as my vhost template.

    not only does it force the www domain, it strips out visitors ability to go to /index.html/htm or home.html/htm and instead directs them to /, cleans up analytics and server logs a lot and removes potential duplicate content from the search engines.
     
  5. yoannb

    yoannb Guest

    0
     
    ure a G, thank you
     
Loading...