301 Redirect Not Working

#606153
  • Resolved Anonymous
    Rank Math free

    I have a WordPress Elementor site hosted on Azure. Everything works fine going straight to website withouth the wwww. However it fails to redirect going to the www version.

    I’ve followed the information in this article https://rankmath.com/kb/url-incorrect-version-redirection/ and I can see that the htaccess is updating correctly however nothing changes.

    Is there another way? I’ve tried updating it with both updates to the htaccess, of course replacing with my url.

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

    AND

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

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    In this case, you may need to get in touch with your web host and check if you can redirect the WWW version of your site.

    It is possible that they are blocking the WWW subdomain redirects in .htaccess under their system or have a different process for applying that kind of redirection.

    Hope that helps.

    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘301 Redirect Not Working’ is closed to new replies.