url redirection

#312031
Viewing 1 replies (of 1 total)
  • Nigel
    Rank Math business

    Hello,

    Thank you for contacting Rank Math for help with your redirect rules.

    The www is a different domain from the non-www version so redirects from the two versions have to be handled at server level.

    Use the following .htaccess rules on Apache servers

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

    For Nginx server you can add the following block to the config file:

    
    server {
        server_name www.example.com;
        return 301 $scheme://example.com$request_uri;
    }
    

    You can ask your host for assistance setting up the www to non-www redirects. Once they are set up, your Rank Math redirects should start working.

    Hope that helps. If you have questions, do not hesitate to ask. We are here to help.

    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 ‘url redirection’ is closed to new replies.