No redirection from www to non-www

#53063
  • Resolved Rahul Pandey
    Rank Math free

    In the beginning, i had a www. domain and then i removed the wwww. I was using yoast seo and thus anyone trying to reach me with www was redirected to my non-www domain i.e. https://technicalnewton.com/

    Right now, i am seeing that i have two different websites the one which is original i.e. non-www and the one at the first with www.

    I installed a plugin to create a redirection but rankmath was suggesting to deactive it and thus they both were not working great together. What should i do now? How to redirect the old domian to the new one?

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

    Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.

    I can suggest that you create the redirection via the the .htaccess file. You can achieve this by adding the following directive:

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

    If even that doesn’t work, try the following code snippet instead.

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

    Looking forward to helping you. Thank you.

    ​​​​​​​

    Hi, I didn’t know how to do that. I am not a tech guy. Please simplify the things.

    Todd
    Rank Math free

    Hi Rahul,

    Since this issue is not related to Rank Math, you will need to contact your web host and ask them to do this.

    If you need help with anything else related to Rank Math, please open a new support ticket here so we can help:

    https://support.rankmath.com

    We are always here for assistance.

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

The ticket ‘No redirection from www to non-www’ is closed to new replies.