I made a couple of edits to my htaccess file today to redirect. htaccess now has this:

Redirect 301 / https://www.newsite.org

If I type my domain into the address bar, it redirects properly. However, if I search for my site on Google and click on it, I receive a ERR_SSL_PROTOCOL_ERROR error. This only happens in Chrome and Safari, the redirect works in Firefox. I have an SSL certificate through my hosting provider, no changes have been made to the SSL certificate, it isn't expired, so I'm not sure why I am receiving this error 1. now 2. only via Google search results.

I didn't make any change to SSL, didn't move the site, just a redirect. Can someone suggest what I might have done wrong or help?

  • That directive will redirect everything that uses that .htaccess file unconditionally. It is impossible to know what is going on without more context. What else do you have in your .htaccess file? Do you have other servers or virtual hosts with other .htaccess files? What is your configuration that is related to SSL? Oct 27, 2021 at 20:09
  • Hello, I have nothing else in my .htaccess file. I added some other subpage redirects, ex. Redirect 301 / newsite.org Redirect 301 /fellows newsiteorg But I deleted those updates when I started to have this issue. I made the edits in Dreamweaver, which may be part of the issue. I've had the same SSL Certificate for a long time now, I didn't make any changes today, it's not expired or anything. Oct 27, 2021 at 20:14
  • Without giving any useful data like the website name involved (or full configuration, or which software you use, which version, which OS, etc.), no one can really help you. Go to ssllabs.com/ssltest and test your website it should give you clear explanations on what works or not, for different clients (browsers). Oct 27, 2021 at 21:05
  • I suspect you will get the same (or similar) "error" if you request example.com/foo (ie. anything but the homepage), regardless of browser. "2. only via Google search results." - Probably because the URL is not example.com/.
    – MrWhite
    Oct 27, 2021 at 23:29
  • @swendenson This is a pretty common error due to browser cache or your system's time. Since Firefox is fine, I'm guessing it's the former. Try going through the list here. Also using incognito mode might help. There are also online browser screenshot sites that can test your site in different browsers. Lastly, check to make sure that the URLs you type in your browser and the ones indexed in Google that you click on are exactly the same - including the www part to see if that makes a difference.
    – dan
    Oct 28, 2021 at 1:09

1 Answer 1

Redirect 301 / https://www.newsite.org

You are missing a trailing slash on the end of the target URL (after the hostname). It should be like this:

Redirect 301 / https://www.newsite.org/

The Redirect directive is prefix-matching. Everything after the match (a single slash in this case) is copied onto the end of the target URL.

(The Redirect directive is for redirecting entire branches of URLs - or entire sites - not just individual URLs.)

So, without the trailing slash on the target, when you request a URL like example.com/foo it will redirect to https://www.newsite.orgfoo , which will likely result in domain resolution errors, SSL errors, etc. (The malformed redirect should be obvious by looking at the URL in the browser's address bar.)

With the trailing slash then foo is copied onto the end of https://www.newsite.org/ resulting in https://www.newsite.org/foo - all good.

Requests for the document root exampel.com/ "work" because it's simply a redirect to https://www.newsite.org. (Although even in this case, the browser is having to "fix" the target URL by appending a slash after the hostname.)

  1. only via Google search results

It's quite likely the URL you are clicking on is not just example.com/.

  1. now

You seem to be looking just at the "SSL Certificate" aspect, but it's probably a completely different domain.

301 (permanent) redirects are also persistently cached by the browser. So, you might also be seeing a mix of old (cached) redirects/responses.

This only happens in Chrome and Safari, the redirect works in Firefox.

I don't believe Firefox is capable of "correcting" a request for something like https://www.newsite.orgfoo, so this is more likely to be a difference in caching. (?)

TIP: Test with 302 (temporary) redirects to avoid potential caching issues.


  • I thought about the missing trailing slash, but after looking at the edit history, I wasn't sure if that wasn't just a typo (?) If Chrome is redirected to https://www.newsite.orgfoo however, I'm pretty sure they'll receive an ERR_CONNECTION_TIMED_OUT or DNS_PROBE_FINISHED_NXDOMAIN and not an ERR_SSL_PROTOCOL_ERROR (having some familiarity with Chromium source code). Seems more likely a cache issue, but we'll see what the OP figures out...
    – dan
    Oct 28, 2021 at 8:45
  • @dan The "edit history" appears to be consistent on the missing slash? ERR_SSL_PROTOCOL_ERROR - granted, that is a bit odd. Although it's possible that hostname + URL = anotherhostname!? Maybe there's multiple issues here?
    – MrWhite
    Oct 28, 2021 at 13:10
  • It appeared like the OP might have typed the directive from their .htaccess file instead of copying & pasting it, which I believe led Stephen to ask to see it. The added formatting in the subsequent edit might have made that seem not to be the case...but I wasn't sure. In any case, it seems unlikely that a valid TLD would result or that Google would crawl and index that as part of their SERP. If the OP edits the question to include a URL they typed into their browser and a search term they used in Google, then we'd know for sure what was going on by looking at Chrome's DevTools.
    – dan
    Oct 29, 2021 at 0:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.