SEO analyzer says www and non www resolving to different pages

#835587
  • Resolved Marcia M Boothe
    Rank Math free

    SEO Analyzer says www and non www are resolving to different pages. I’ve changed htaccess file and cleared SEO cache but still get error even though it seems to redirect to non www correctly.

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

    I’m sorry to hear that you are facing issues with the redirection of www and non-www versions of your website despite making changes to the .htaccess file and clearing the SEO cache.

    To ensure that the redirection is correctly set up, please follow these steps:

    1. Double-check the .htaccess file to confirm that the redirection rules are correctly implemented. You can use the htaccess tester tool to debug and verify the rewrites before adding them to the .htaccess file.

    2. If you have already added the redirection rule to redirect the www version to the non-www version, ensure that the code snippet is correct. Here is an example of the code snippet you can use:

      RewriteEngine On
      RewriteCond %{HTTP_HOST} www.example.com
      RewriteRule (.*) https://example.com/$1 [R=301,L]
    3. If the above code snippet did not work, you can try an alternative code snippet:

      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^www.website.com [NC]
      RewriteRule ^(.*)$ https://website.com/$1 [L,R=301]
    4. After adding the code snippet, make sure to save the changes and then check if the URLs are redirecting correctly.

    If the issue persists after following these steps, please feel free to reply to this ticket, and a human agent from the Rank Math Support team will assist you further.

    Thank you for your understanding and patience.

    Sources:
    Analyzing Your Site’s SEO with Rank Math’s SEO Analysis Tool
    Why Are Posts Redirecting to www or Non-www Incorrectly?
    How to Redirect WWW Version to Non-WWW Version of Your Website » Rank Math

    Htaccess tester tool says it is working as expected but SEO analyzer still shows error.

    Hello,

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

    Please clear your website caches, remove the transients, clear the SEO Analyzer data in the database tools (WordPress Dashboard > Rank Math > Status & Tools > Database Tools), and re-run the Analyzer again.

    Let us know how that goes.

    Jeremy,

    I previously did all your suggestion except for clearing the transients which I have done now:
    Paused Cloudflare
    RankMath > Tools > Remove RankMath Transients
    RankMath > Tools > Flush SEO Analyzer Data
    I use Super Page Cache for Cloudflare plugin. Purged cache of entire website.
    Reran Analyzer with no changes.

    Still no change in this and other changed settings (e.g. focus keywords). I’m assuming I’m not clearing some other cache somewhere.

    I also just purged whole cache at Cloudflare.com as well with no change.

    Thank you.

    Hello,

    We noticed the WWW variant of your site first redirects to the HTTP version before finally redirecting to the HTTPS variant. https://www.natureinfocus.com/ redirects to http://natureinfocus.com before redirecting to https://natureinfocus.com.

    https://imgur.com/pdGAJhu

    Please refer to this Cloudflare community thread: https://community.cloudflare.com/t/cname-redirecting-www-to-non-www-redirects-to-http-instead-of-https/516917/19

    Hope that helps, and please do not hesitate to let us know if you need our 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 5 replies - 1 through 5 (of 5 total)

The ticket ‘SEO analyzer says www and non www resolving to different pages’ is closed to new replies.