• Hi!
    I just installed WordPress on my webserver.

    I’d like to know how to redirect people who type https://example.com/ to https://www.example.com/. I know pros say that only newbies want to do that, but I’d like to know how to do it.

    Some minutes ago I was reading this post that said a fresh installation of WordPress can redirect to https://www.example.com/ without making any changes, but I don’t know how to do it.

    I also tried modifying my .htaccess file. I added this:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
    RewriteRule ^(.*)$ https://www.domain.com/$1 [R=301,QSA,L]
    </IfModule>

    , but now it shows the “page not found” message.

    In Settings > General I changed Blog Address to https://www.example.com/, but nothing.

    Any help is greatly appreciated.

  • The topic ‘Cannot redirect to www’ is closed to new replies.