• Usually, WordPress redirects www to non-www, and this has been true for all other sites I’ve made. However, for some reason, it doesn’t do that with my new site https://will.website. If you go to https://www.will.website, it doesn’t redirect to will.website.

    Why doesn’t it redirect (maybe it’s to do with my obscure & new TLD, ‘.website’) and how can I redirect it?

Viewing 5 replies - 1 through 5 (of 5 total)
  • I had to manually add this to my .htaccess file to achieve such redirects, never seen it done automatically!

    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    Options -Indexes
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www.yourdomain\.com$
    RewriteRule (.*) https://yourdomain.com/$1 [R=301,L]
    </IfModule>
    
    <IfModule mod_rewrite.c>
    Options +FollowSymLinks
    RewriteCond %{THE_REQUEST} ^.*/index.html
    RewriteRule ^(.*)index.html$ https://yourdomain.com/$1 [R=301,L]
    </IfModule>

    Try it with your domain…

    Thread Starter Will24_

    (@will24_)

    Thanks, it works now.

    & Really? They released an update which automatically redirects www to non-www a while ago. It’s worked for me every time apart from this.

    Good stuff! News to me on the auto redirect. How/where do you set what you want, non-www or www?! I haven’t see that…

    Thread Starter Will24_

    (@will24_)

    By default, it redirects www to non-www. To change it, you go to Settings > General and change the Site Address & WordPress Address to https://www.domain.com.

    Good to know, thanks Will.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WordPress didn't redirect www to non-www’ is closed to new replies.