3

I'm having difficulty fixing this problem: I ran an SEO test (on sitechecker.pro) on my portfolio, and it gave me this problem that I can't figure how to fix:

Search engines see your http://gvdavidtran.com and http://gvdavidtran.com/index.html (or http://gvdavidtran.com/index.php) as different pages. With a variety of URLs, it's more challenging to get consolidated metrics for a specific piece of content.

I tried:

  1. Adding a canonical link in the index.html file so it refers to http://gvdavidtran.com
  2. Verifying permissions with Google Search Console, but I'm not sure if that helps, because it may only fix on Google and not other search engines.

Would adding an .htaccess file help, or is it only for Wordpress/php? I'm not sure what else to do to fix it.

My website is a simple html page, not a Wordpress.

First time asking a question here, thanks!

Deepu Reghunath
  • 8,132
  • 2
  • 38
  • 47
davidtran
  • 31
  • 4

2 Answers2

0

That "statement" isn't necessarily highlighting a current problem with your site. Providing you are consistently linking to http://example.com/ throughout your site and not mixing this with http://example.com/index.html in other places.

Adding a rel="canonical" tag, pointing to the canonical URL (as you suggest) is sufficient to avoid any potential SEO problems.

However, implementing a 301 redirect from /index.html to / in .htaccess would be a "belt & braces" approach. If you have a "simple HTML page" (ie. not WordPress) then you can do this in a single mod_rewrite directive in .htaccess:

RewriteEngine On
RewriteRule (.*)index\.html$ /$1 [NS,R=301,L]

The NS flag prevents this rule being processed for subrequests (which is what prevents a redirect loop in this instance).

MrWhite
  • 43,179
  • 8
  • 60
  • 84
0

I believe this could be an issue with sitechecker pro. I have tried a whole host of different solutions and do not once reference "/index.html", however it insists that there is an issue between that and "/index.php"

Even using rel="canonical" and .htaccess Redirect 301 it still refuses to concede defeat!