Affordable growth: Reducing hosting costs while improving site functionality with Cloudflare

Affordable growth: Reducing hosting costs while improving site functionality with Cloudflare

Affordable growth: Reducing hosting costs while improving site functionality with Cloudflare

Oct 25, 2024

Oct 25, 2024

Franco Simeone

Franco Simeone

Co-Founder & Front-End Engineer

When a client approached us with high hosting costs about their website's, we knew there had to be a better solution. Their site was hosted on Netlify, and while the base plan was affordable, some extra bandwidth charges were inflating their monthly bill for more than 4.000%.

They needed a cost-effective alternative that wouldn't compromise on functionality or user experience. That's when we recommended migrating their site to Cloudflare—a move that not only eliminated their extra costs but also enhanced their website's capabilities.


The Challenge: Unsustainable Hosting Costs


Our client was experiencing significant growth in traffic, with their site receiving over 1 million users. While this surge was excellent for their business, it was disastrous for their hosting expenses. Netlify's pricing model charges extra for bandwidth usage beyond the limits of their base plan. As a result, the client was paying almost $1,300 extra per month just for additional bandwidth. This unexpected expense was cutting into their profits and reducing their ability to invest in other areas of growth.


Additionally, they had plans for the coming months that we knew we could address using Cloudflare:

  • Geolocation-Based content: They wanted visitors to be automatically directed to country-specific pages based on their location.

  • Dynamic Previews Rendering: The ability to render previews of dynamically generated content for bots and crawlers, such as when sharing links on platforms like WhatsApp or Facebook.


They needed a solution that addressed both the financial strain and these technical hurdles.


Our Solution: Migrating to Cloudflare


We proposed moving their website to Cloudflare, which offers:

  • Zero Hosting Costs: Cloudflare Pages provides free hosting with unlimited bandwidth, immediately eliminating the $1,300 monthly bandwidth charges.

  • Enhanced Functionality: For just $5 per month, Cloudflare Workers allowed us to add custom features directly at the edge of the network, improving performance and user experience. This $5 cost was due to the high number of users they had; for smaller businesses, this could even be $0.


This migration promised not only substantial cost savings but also the flexibility to implement advanced functionalities without additional infrastructure.


The Process: A Smooth Transition


The migration of the site was very straightforward. We:

  • Added Few Lines of Code: Implemented necessary adjustments to make the site compatible with Cloudflare Pages.

  • Deployed the Site: Uploaded the site to Cloudflare's servers.

  • Changed the Domain Configuration: Updated the DNS settings to point to Cloudflare.


The entire process was completed on the same day we started working on it, ensuring minimal downtime and disruption.


Implementing Geolocation-Based Redirection


One of the client's primary goals was to deliver localized content seamlessly. They wanted users to automatically land on the version of the site tailored to their country, enhancing relevance and engagement.


Here's how we achieved this with Cloudflare Workers:

  1. User Location Detection: We utilized a script that runs whenever someone visits the website. Cloudflare Workers provides built-in geolocation capabilities, allowing us to determine the user's country based on their IP address effortlessly. This meant the code was really simple, leveraging Cloudflare's existing features.


  2. Automatic Redirection: Based on the detected location, the script redirects the user to the appropriate country-specific page. This process is swift and transparent, requiring no action from the user.


By implementing this solution, we improved the user experience by providing content that was immediately relevant, which can lead to increased engagement and conversion rates.


Rendering Previews for Dynamic Content


The client's website included a page with dynamically loaded content essential for user interaction. However, when users shared links to this page on platforms like WhatsApp or Facebook Messenger, the preview snippets (like images and descriptions) weren't generating properly because these platforms' crawlers couldn't render the dynamic content.


To solve this, we utilized Cloudflare Workers to:

  1. Detect Bots and Crawlers: We configured the Worker to identify when a request was coming from a bot or crawler, such as those used by social media platforms to generate link previews.


  2. Serve Pre-Rendered HTML:  When a crawler was detected, the Worker fetched the dynamic data and generated a static HTML version of the page, including the necessary meta tags for previews. This pre-rendered page was then served to the crawler.


This approach ensured that when users shared the page, the platforms could generate accurate and engaging previews, enhancing the sharing experience without altering the experience for regular users.


The Impact: Significant Savings and Enhanced Performance

  • Cost Savings: The client's hosting expenses dropped from over $1,330 per month to just $5 per month. The free unlimited bandwidth on Cloudflare Pages eliminated the hefty overage charges they faced on Netlify.


  • Improved User Experience: The geolocation redirection ensured users saw content relevant to their region instantly, enhancing satisfaction and engagement.


  • Enhanced Sharing Experience: By serving pre-rendered pages to bots and crawlers, dynamic content became accessible for generating previews. The client noticed an increase in user engagement as shared links now displayed attractive and informative previews.



Conclusion: A Win-Win Solution


By switching to Cloudflare, we addressed the client's immediate financial concerns and improved their website's functionality and performance. The move resulted in over $1,300 in monthly savings, better user engagement through localized content, and enhanced sharing experiences for their dynamic pages.



Is Your Business Facing Similar Challenges?

If escalating hosting costs and technical limitations are holding your business back, we're here to help. Our team specializes in creating cost-effective solutions that enhance performance and user experience.

When a client approached us with high hosting costs about their website's, we knew there had to be a better solution. Their site was hosted on Netlify, and while the base plan was affordable, some extra bandwidth charges were inflating their monthly bill for more than 4.000%.

They needed a cost-effective alternative that wouldn't compromise on functionality or user experience. That's when we recommended migrating their site to Cloudflare—a move that not only eliminated their extra costs but also enhanced their website's capabilities.


The Challenge: Unsustainable Hosting Costs


Our client was experiencing significant growth in traffic, with their site receiving over 1 million users. While this surge was excellent for their business, it was disastrous for their hosting expenses. Netlify's pricing model charges extra for bandwidth usage beyond the limits of their base plan. As a result, the client was paying almost $1,300 extra per month just for additional bandwidth. This unexpected expense was cutting into their profits and reducing their ability to invest in other areas of growth.


Additionally, they had plans for the coming months that we knew we could address using Cloudflare:

  • Geolocation-Based content: They wanted visitors to be automatically directed to country-specific pages based on their location.

  • Dynamic Previews Rendering: The ability to render previews of dynamically generated content for bots and crawlers, such as when sharing links on platforms like WhatsApp or Facebook.


They needed a solution that addressed both the financial strain and these technical hurdles.


Our Solution: Migrating to Cloudflare


We proposed moving their website to Cloudflare, which offers:

  • Zero Hosting Costs: Cloudflare Pages provides free hosting with unlimited bandwidth, immediately eliminating the $1,300 monthly bandwidth charges.

  • Enhanced Functionality: For just $5 per month, Cloudflare Workers allowed us to add custom features directly at the edge of the network, improving performance and user experience. This $5 cost was due to the high number of users they had; for smaller businesses, this could even be $0.


This migration promised not only substantial cost savings but also the flexibility to implement advanced functionalities without additional infrastructure.


The Process: A Smooth Transition


The migration of the site was very straightforward. We:

  • Added Few Lines of Code: Implemented necessary adjustments to make the site compatible with Cloudflare Pages.

  • Deployed the Site: Uploaded the site to Cloudflare's servers.

  • Changed the Domain Configuration: Updated the DNS settings to point to Cloudflare.


The entire process was completed on the same day we started working on it, ensuring minimal downtime and disruption.


Implementing Geolocation-Based Redirection


One of the client's primary goals was to deliver localized content seamlessly. They wanted users to automatically land on the version of the site tailored to their country, enhancing relevance and engagement.


Here's how we achieved this with Cloudflare Workers:

  1. User Location Detection: We utilized a script that runs whenever someone visits the website. Cloudflare Workers provides built-in geolocation capabilities, allowing us to determine the user's country based on their IP address effortlessly. This meant the code was really simple, leveraging Cloudflare's existing features.


  2. Automatic Redirection: Based on the detected location, the script redirects the user to the appropriate country-specific page. This process is swift and transparent, requiring no action from the user.


By implementing this solution, we improved the user experience by providing content that was immediately relevant, which can lead to increased engagement and conversion rates.


Rendering Previews for Dynamic Content


The client's website included a page with dynamically loaded content essential for user interaction. However, when users shared links to this page on platforms like WhatsApp or Facebook Messenger, the preview snippets (like images and descriptions) weren't generating properly because these platforms' crawlers couldn't render the dynamic content.


To solve this, we utilized Cloudflare Workers to:

  1. Detect Bots and Crawlers: We configured the Worker to identify when a request was coming from a bot or crawler, such as those used by social media platforms to generate link previews.


  2. Serve Pre-Rendered HTML:  When a crawler was detected, the Worker fetched the dynamic data and generated a static HTML version of the page, including the necessary meta tags for previews. This pre-rendered page was then served to the crawler.


This approach ensured that when users shared the page, the platforms could generate accurate and engaging previews, enhancing the sharing experience without altering the experience for regular users.


The Impact: Significant Savings and Enhanced Performance

  • Cost Savings: The client's hosting expenses dropped from over $1,330 per month to just $5 per month. The free unlimited bandwidth on Cloudflare Pages eliminated the hefty overage charges they faced on Netlify.


  • Improved User Experience: The geolocation redirection ensured users saw content relevant to their region instantly, enhancing satisfaction and engagement.


  • Enhanced Sharing Experience: By serving pre-rendered pages to bots and crawlers, dynamic content became accessible for generating previews. The client noticed an increase in user engagement as shared links now displayed attractive and informative previews.



Conclusion: A Win-Win Solution


By switching to Cloudflare, we addressed the client's immediate financial concerns and improved their website's functionality and performance. The move resulted in over $1,300 in monthly savings, better user engagement through localized content, and enhanced sharing experiences for their dynamic pages.



Is Your Business Facing Similar Challenges?

If escalating hosting costs and technical limitations are holding your business back, we're here to help. Our team specializes in creating cost-effective solutions that enhance performance and user experience.

Ready to explore the possibilities?

Reach out to Sagitta, and let's collaborate on your next digital endeavor. Together, we'll create solutions that fulfill and exceed your expectations.

Ready to explore the possibilities?

Reach out to Sagitta, and let's collaborate on your next digital endeavor. Together, we'll create solutions that fulfill and exceed your expectations.

© 2024 Sagitta. All rights reserved.

Timezone (PT -  CET)

Follow us on:

© 2024 Sagitta. All rights reserved.

Timezone (PT -  CET)

Follow us on:

© 2024 Sagitta. All rights reserved.

Timezone (PT -  CET)

Follow us on: