0

When I access to EC2 with http://XXX.XXX.XXX.XXX, the access was redirected to https://XXX.XXX.XXX.XXX. Also, EC2 instance does not have certificate for HTTPS.

How do I stop the redirection. By the way, I am using AMIMOTO of Wordpress.

I am looking forward to your reply.

mitsuki
  • 29
  • 4
  • This thing control by .htaccess file. But why do u wanna prevent this. Its not gonna be a good outcone for your site – sayalok Jun 29 '20 at 09:07
  • This is a duplicate of this question: [How to disable HTTPS and redirect HTTPS to HTTP in Wordpress?](https://stackoverflow.com/questions/62315483/how-to-disable-https-and-redirect-https-to-http-in-wordpress) – FluffyKitten Jun 29 '20 at 20:40

1 Answers1

1

There are 2 things to consider:

  1. HTTPS redirect is done via server redirect, usually with HTTP status code 301. Depending on your server (nginx, apache etc) there are different ways to achieve that, but assuming it's apache, take a look at this to know what to look for

  2. Once you are hit with redirect, modern browsers cache that 301 response for a long time. So even after you disable it you can still experience redirect. Here's example how to clear that in Chrome. This will obviously affect only your browser and if any customers hit the page, they will still be redirected for quite some time.

But best approach would undeniably be to set up and enable SSL.

Oleksii Donoha
  • 2,911
  • 10
  • 22