I'm getting the following critical error when running my website through Site Checker.
Search engines see your
https://www.example.com
andhttps://www.example.com/index.html
(orhttps://www.example.com/index.php
) as different pages.If you don't explicitly tell Google which URL is canonical, Google will make the choice for you or might consider them both of equal weight, which might lead to unwanted behavior.
I can understand what it is telling me and I've spent many hours researching to find a fix but with no luck. I've read Googles article (and watched the video) but this didn't give me any clues. I'd already done the redirects due to another warning site checker previously gave me.
I've added the tag rel="canonical"
unfortunately this did not resolve the issue.
I have the following in my .htaccess
file as suggested in another post.
# Force HTTPS and WWW
RewriteCond %{HTTP_HOST} !^www\.(.*)$ [OR,NC]
RewriteCond %{https} off
RewriteRule ^(.*)$ https://www.example.com/$1 [R=301,L]
Redirect 301 /index.html https://www.example.com/index.php
Redirect 301 /default.php https://www.example.com/index.php
DirectoryIndex index.php