I have a small personal website with a
.dev TLD, which has HSTS enforced across the entire TLD. So my site is entirely HTTPS with Let's Encrypt certs and all that fun stuff. This year I've been playing the world's slowest game of whack-a-mole with Google Search Console indexing problems. Because of one of those complaints, my home page (let's say
https://lastname.dev) now includes a rel=canonical tag identifying the canonical URL as
https://lastname.dev. This was necessary because I also have another, older domain that redirects here (which I'm about to shut down, but I digress).
Today, I was notified of a new error that is absolutely baffling to me: Google has acknowledged my choice of canonical URL and deliberately chosen to ignore it by selecting its own canonical URL instead. That Google-selected canonical URL is
http://lastname.dev. I'm completely confused by why it would forcibly override my choice with the HTTP version of that choice, especially when I've never linked to the HTTP URL anywhere, which is because the entire
.dev TLD enforces HSTS -- i.e. the site can't even be accessed over HTTP and attempting to do so causes the browser to automatically redirect to the HTTPS version anyway. But indeed, if I open a general Google search and type in
lastname.dev, the #1 hit is
http://lastname.dev, even though all other hits (other pages on my website) are all the HTTPS versions of those pages.
I really have no clue here. Any ideas? I have no SEO skills or training as my day job is backend work on private cloud apps that no search engine will ever see, and I don't really care about making it super-visible in Google searches as it's just my personal project portfolio (which is less important now that I've been out of college and in full-time industry work for a couple of years), but I do want it to look professional and like I know what I'm doing.
head section of the page is:
<head> <title>Portfolio</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="canonical" href="https://lastname.dev/"> <link rel="shortcut icon" href="images/favicon.ico"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> </head>
There is an
.htaccess file, which is simply:
RewriteEngine on RedirectMatch 301 /timer.html /timer/