1

Google Search Console tries to index https://www..... but my website does not have www subdomain. This is preventing a new indexing of the website. The live-URL test fails. The removing tool within the Google Console will remove https, http, with and without www and this is not what I want. I want Google Console to stop searching for https://www.... Any idea how to handle this?

Code4Fun
  • 111
  • 2

2 Answers2

2

Sounds like you've decided you don't want to use www for your website. That's a fine choice if you're aware of the tradeoffs.

The idea of the fix is simple, though the implementation might vary a bit depending on your hosting provider. Get the following redirects in place, and it should solve your canonicalization issue permanently, both with Google Console and with any users who visit your website in your web browser.

  • 301 redirect http://www.example.com/* to https://www.example.com/*
  • 301 redirect http://example.com/* to https://example.com/*
  • 301 redirect https://www.example.com/* to https://example.com/*

You will need to implement these redirects using .htaccess, another type of configuration file, or in your hosting control panel, depending on your hosting situation. Then, verify that the redirects are properly in place by using your browser's dev tools or an online redirect checking tool.

For reasons beyond the scope of this post, it's best practice to set up the redirects exactly as I've shown: in particular your server should first redirect HTTP to HTTPS before redirecting again to the canonical domain. Further reading in this ServerFault answer: HSTS and Wordpress redirection to www and non-www and https - avoid multiple redirections?.

Maximillian Laumeister
  • 16,461
  • 3
  • 32
  • 63
1

Google Search Console tries to index https://www.

I suspect this may be because Google is seeing links to https://www....

Best practice is to use a non-apex DNS record, and specifically a www. host name on your website DNS. Apex DNS records are very limited and typically overlap with MX records. You can only have one record. That record must be an A record. That severly limits your capacity and availability. While Cloudflare (and possibly others) have mechanisms for cheating on this, choosing this route removes future choices.

Since Firefox, Edge, Chrome and Opera will automatically search for a www host if you enter the domain ONLY in the browser, and hide this prefix, what are you gaining by restricting to the non-prefixed name?

(Assuming that the apex record can be used) your webserver should be configured to listen for both names and return a permanent redirect to the desired name.

symcbean
  • 801
  • 3
  • 6