From Ahrefs: Canonical points to redirect

Hey all:

I got a message saying that this site (https://www.lowellsanders.com) has a canonical link pointing to a redirecting URL.

This is ahref's remedy:

How to fix

Review the list of pages with canonical links pointing to a redirecting URL.

Replace the redirecting canonical links with the direct links to the valid 200 (OK) page versions that you want to be indexed in search results.

I'm wondering if the settings in my .htaccess file are causing this:

Options -Indexes

RewriteEngine On 
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://lowellsanders.com/$1 [L,R=301]


Redirect 301 /sitemap.xml /sitemap.php

RewriteEngine On
# Match any request that has index.php/ in the middle and redirect to 404
RewriteCond %{REQUEST_URI} ^/.*index\.php/.+ [NC]
RewriteRule .* - [R=404,L]


ErrorDocument 404 /error-404/

What's the best way to sort this out?

As always, my thanks in advance for any help.

10 replies