www. Redirect Isssue

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello,

    Thank you for getting in touch with us.

    To redirect your website from non-www to www, add the following lines in your website’s .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^yourdomain.com [NC]
    RewriteRule ^(.*)$ http://www.yourdomain.com/$1 [L,R=301]

    Replace yourdomain.com with your actual domain name.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thank you.

    I have inserted this code and it works.

    The issue I have found is that every time there is a plugin update this reverts to its original code without the redirect code.

    Any advice on how to stop this from happening?

    Hi, I have the same problem, so no need to open a new ticket since this is still open for new replies.

    My site has a WWW Canonicalization as it shows in my Rank Math Analysis, and I can’t add those code in my .htaccess file because I don’t have access to it as my host support told me, and they suggest to use a simple redirection plugin to do it.

    My question is: since Rank Math has a feature to use redirection, how can I use it to redirect all WWW to non-www and all http to https??

    hi,

    thanks for that advise. I have used this is the past. the issue re-occurs. Basically, when there is an update the code disappears.

    Is there another solution?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this ticket.