We build websites for hotels and villas, and we tell every client that speed matters. So it was uncomfortable when Google's PageSpeed Insights scored our own site 72 on mobile.
This is what we measured, what we changed, and what moved the score to 92 on mobile and 99 on desktop. Nothing here is specific to an agency site. The same causes slow down most hotel and villa websites in Bali, and the same fixes apply.
1. Measure before changing anything
A PageSpeed score is a summary. The useful part is underneath it: where the waiting time actually goes. We broke one page request down, measured from Indonesia:
| Step | Time |
|---|---|
| Connecting to the server | 314 ms |
| Setting up the secure connection (HTTPS) | 253 ms |
| Waiting for the first byte of the page | 249 ms |
Over half a second passed before the page even started to arrive. Then the surprise: building the page on the server took only about 27 ms. The server wasn't slow. It was far away. Our hosting was in the United States, and our visitors are in Indonesia.
2. The groundwork: the fixes every site needs
Before tackling distance, we did the standard work that any hotel website should have. None of it is exotic:
- Images in WebP, sized for the screen. The home page's large background photo has a separate phone-sized version of about 77 KB, so phones never download the desktop file.
- The main image requested early. Background images are normally discovered late, after the stylesheet loads. A preload hint makes the browser fetch it with the page itself.
- Fonts served from our own domain instead of Google Fonts, which removed a separate connection to another server before any text could appear.
- Analytics only after consent. Google Analytics now loads only when a visitor accepts the cookie banner. A visitor who declines never downloads it, which spares them roughly 78 KB.
- Width and height on every image, so the page doesn't jump around as pictures arrive.
All of this helped. But none of it could fix half a second spent crossing the Pacific.
3. Bring the website closer to the guest
We put the site behind Cloudflare's free plan, a network of servers around the world, including in Asia. Visitors now connect to a nearby Cloudflare server instead of the one in the US.
- Setting up the connection dropped from about 570 ms to about 260 ms.
- Images, stylesheets, scripts and fonts are now stored at Cloudflare's servers in Asia, so they no longer travel from the US at all after the first visit.
One thing needs care here: moving a domain to Cloudflare also moves its email settings. We moved the mail records first, so no email went missing. If you try this on your own property's domain, check your email before and after.
4. Cache the pages themselves
By default, Cloudflare stores images and files but still fetches every page from the original server. So each page still travelled from the US. We added one rule that lets Cloudflare keep a copy of each page for two hours, with sensible exceptions: the contact form, and anything that must stay live.
The server's reply time after connecting dropped from about 650 ms to about 90–140 ms. This was the change that moved the score most.
The result
| Measure (PageSpeed, mobile) | Result |
|---|---|
| Performance score | 92 (was 72). Desktop: 99 |
| First Contentful Paint | 1.7 s |
| Total Blocking Time | 0 ms |
| Layout shift | 0.005 |
| Largest Contentful Paint | 3.3 s (still above Google's 2.5 s target) |
Accessibility, Best Practices and SEO all scored 100 on mobile. We're not finished: the main image still appears later than we'd like on a slow phone connection, and that's what we're working on next.
What a hotel or villa owner can take from this
- Test your own site at pagespeed.web.dev, on the mobile tab. It takes a minute.
- Check where your hosting is. If your guests are in Asia and your server is in the US or Europe, distance alone can cost you half a second on every page.
- Look at your biggest images first. The large photo at the top of the home page is usually the heaviest file on the whole site.
- Count your extra scripts. Chat widgets, trackers and pop-ups each add waiting time. Keep the ones that earn their place.
- Don't chase 100. A fast, bookable site in the 90s is worth far more than a perfect score on a site that doesn't take bookings.
The short version: our server was never the problem. Distance was. Getting the site closer to our visitors did more than every other fix combined.
Every hotel and villa site we build gets this treatment from day one, as part of our hotel and villa website development. For the marketing side of a villa website, read villa marketing in Bali.
