Www canonicalization

#241082
  • Resolved Cody
    Rank Math free

    I don’t know how to set up a redirect to fix this rank math is telling me the WWW and non www Versions off my URL or not redirected to the same site

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.

    Unfortunately, we can’t do it from Rank Math as this needs to be done more on a server level, hence the usage of .htaccess file for this.

    We would recommend that you get in touch with your web host and ask them to set that up for your website. Alternatively, if that’s not a possibility the only other option is to ignore that error completely.

    A sample code for your website would look like this.

    Redirect from www to non-www:

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

    Redirect from non-www to www:

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

    You need to make a decision on which version you would like your website to be and use the appropriate one.

    I hope that helps.

    Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

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