Score:1

The HTTP version of my websites take a long time to resolve, while HTTPS versions instantly resolve. How to debug it?

cn flag

I create many websites for my customers.

And I register domains via different registrars.

And I have a couple of VPS servers, distributed in different data centers.

However, I see this weird behavior.

When I use example.com which translates into http://example.com I see that it takes a lot of time and usually the first time it won't respond and times out and on the second refresh it works.

However, if I explicitly write https://example.com it instantly brings up the website.

Here's my configuration:

  • Debian bullseye
  • Nginx with HTTP redirection
  • Docker

How can I debug this? I have no clue on where to look and what too check.

drookie avatar
za flag
They do resolve in identical time, because it's the same domain name. It's the connection/session lag you're observing. Start from the point where you subjectively measure the time needed to connect to the target port, comparing `telnet example.com 80` and `telnet example.com 443`. Then, if these two times will be also the same, you could start exploring the phases using curl.
in flag
Use the developer tools of your browser to find out which part of the request takes the most time.
mx flag
There's probably something redirecting from HTTP to HTTPS, and this component is slow.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.