I have an Apache Tomcat 8 web app correctly running on my website that is reverse proxied to the Apache2 server which serves up the web app at my domain name. I then provided alias' in my site's conf file in Apache2, and in my DNS Record in my site's DNS Record Management, to redirect http://www.example.com to http://example.com. That all works. I set up Apache 2 to serve the alias www.example.com to domain.com, and have used Let's Encrypt to redirect all http://example.com and http://www.example.com to https://example.com. I encrypted for http://example.com only since encrypting for both domain.com and www.example.com cause my www.example.com browser address to not redirect to example.com (and subsequently to https://example.com). So my browser all works good for either http://example.com or http://www.example.com to redirect to https://example.com. The problem is that in Google Webmaster Tools the site verification for http://www.example.com fails. Says unable to connect to server. Seems the Google verification does not do a redirect. Any insight into this would be appreciated. Thanks in advance.
Please include your redirect code. Otherwise, how would we know?– closetnocMar 18, 2018 at 16:29
I'm able to verify my redirecting properties in Google Search Console. "Can't connect to the server" sounds like the server went down or is not available. It doesn't sound like a problem with the redirects to me.– Stephen Ostermiller ♦Mar 18, 2018 at 17:14
I used the DNS Text Record method for Google site verification. I didn't know the DNS provider so I used Other, making the Text Record at A2 Hosting, and waiting for the DNS changes to propagate. All works now. Thanks for the replies.
From your site admin, go to Navigation. Click URL Redirects: Click Add URL redirect: Enter the old URL you want to redirect visitors from in the Old URL field. Only broken URLs should be redirected. ...