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:
- Adding a canonical link in the index.html file so it refers to http://gvdavidtran.com
- 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!
2
Answers
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 withhttp://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
:The
NS
flag prevents this rule being processed for subrequests (which is what prevents a redirect loop in this instance).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!