skip to Main Content

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!

2

Answers


  1. 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).

    Login or Signup to reply.
  2. 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!

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search