Slow initial Connection and TTFB

Adam Domoney 1 Reputation point
2022-02-25T10:08:15.303+00:00

Hi, I am trying to troubleshoot an issue with a slow webpage load. My initial connection is slow and TTFB is slow.
The two webpages I am working on is https://websites4.me/index.html (all it contains is Hello World) and my actual page https://websites4.me/index.php
I am seeing a 400 ms and 800 ms (desktop and mobile) for index.html and 1.2 seconds and 4.2 seconds (desktop and mobile) for index.php.

Locally the pages load fast.

https://websites4.me/index.html

curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://websites4.me/index.html
Testing Website Response Time for :https://websites4.me/index.html

Lookup Time: 0.001245
Connect Time: 0.002473
Pre-transfer Time: 0.014100
Start-transfer Time: 0.015330

Total Time: 0.015372


https://websites4.me/index.php

curl -s -w 'Testing Website Response Time for :%{url_effective}\n\nLookup Time:\t\t%{time_namelookup}\nConnect Time:\t\t%{time_connect}\nPre-transfer Time:\t%{time_pretransfer}\nStart-transfer Time:\t%{time_starttransfer}\n\nTotal Time:\t\t%{time_total}\n' -o /dev/null https://websites4.me/index.php
Testing Website Response Time for :https://websites4.me/index.php

Lookup Time: 0.000987
Connect Time: 0.004234
Pre-transfer Time: 0.015156
Start-transfer Time: 0.054611

Total Time: 0.057658


I am testing with https://pagespeed.web.dev/ + https://gtmetrix.com/ + https://www.webpagetest.org/

Any help would be appreciated.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,286 questions
Azure Virtual Network
Azure Virtual Network
An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.
2,204 questions
{count} votes