r/webdev • • 5h ago

Question Best hosting and domain setup for static and dynamic photography websites?

Hey everyone,

I'm planning to develop photography websites, both static portfolio websites and dynamic websites with image uploads and content management.

Currently, I'm considering the following setup:

For static photography websites:

- Domain: Hostinger

- Hosting: Cloudflare Pages

For dynamic photography websites:

- Domain: Hostinger

- Frontend hosting: Cloudflare Pages

- Backend: Cloudflare Workers

- Image storage: Cloudflare R2

My main priorities are:

- Affordable pricing and renewal costs

- Fast image loading and website performance

- Scalability

- Low maintenance

- Reliable hosting with minimal downtime

Since photography websites are image-heavy, I'm particularly concerned about storage costs, bandwidth and image delivery performance.

Is this a good setup for the long term, or should I consider other providers?

Should I purchase the domain directly from Cloudflare instead of Hostinger? Are there any hidden costs, limitations or drawbacks with using the Cloudflare ecosystem for dynamic websites?

Also, what would you recommend for database and image optimization services?

I'd love to hear from anyone who has experience building and hosting photography websites or image-heavy applications.

Thanks in advance!

Edit: we are planning to host the application in India. That's why we decided to buy a domain from Hostinger and host it in cloudfare

3 Upvotes

23 comments sorted by

2

u/funcwei 2h ago

Your stack is close to what I'd pick. Three adjustments for photography specifically:

  1. Domain: Hostinger is fine for year one, but check renewal price — it's usually 2-3x the promo. Cloudflare Registrar sells at cost (no markup, no upsell), Porkbun is the other sane default. Transferring later is free-ish and keeps the name.
  2. Images are the whole product. R2 is cheap ($0.015/GB, zero egress), but serving originals is the mistake. Put Cloudflare Images or a Worker in front: AVIF/WebP, width-based variants (?w=800), and Cache-Control: public, max-age=31536000, immutable with hashed filenames. A 6MB JPEG vs a 180KB AVIF is the difference between a portfolio that feels fast and one that doesn't.
  3. Dynamic uploads: Workers + R2 + D1 (or Supabase) is enough; you don't need a VPS. Free tier is 100k requests/day, which is plenty until you have real traffic.

One thing people forget: EXIF. Strip GPS on upload unless the photographer explicitly wants it — it's a privacy issue and it also cuts file size.

1

u/Dizzy-Item-7123 2h ago

Cloudflare registrar was in our consideration but they don't provide .in domain and their Billings are in USD. We are planning to host this application in India

7

u/Many_Object_8579 4h ago

Registering the domain at Hostinger while the entire stack is Cloudflare makes no sense, Cloudflare Registrar sells at cost with no renewal markup and you'd stop paying for a second account. The part I'd actually push back on is Workers as the CMS backend: you can't run sharp or libvips in a Worker, so your resize pipeline ends up client-side or in some other service anyway, and you're wiring D1 + R2 + auth + a queue to avoid the 5 bucks a Hetzner CX22 costs.

3

u/Heisenberg-6767 4h ago

tbh +1 on moving the domain to Cloudflare Registrar, having DNS and R2 under one roof without Hostinger's renewal hikes makes life way easier. one thing to watch out for on the dynamic upload side is that if you resize images in the browser (converting to WebP/AVIF before uploading via a presigned URL to R2), you completely dodge the Workers CPU and sharp/libvips limitations without paying for an external image proxy. generating 2 or 3 responsive widths at upload time and wiring them into srcset keeps R2 storage tiny and pages fast.

2

u/shopi_dev 5h ago

That stack is fine for this. R2 has no egress fees, which is the big one for image-heavy sites, and Pages is free for static stuff. Buy the domain at Cloudflare if you can, they sell at cost with no renewal markup, and it saves you a DNS hop. For the dynamic sites the main limits are Workers CPU time per request and no native Node APIs, so do image resizing with Cloudflare Images or resize on upload instead of per request. D1 or Supabase handles the metadata fine, and keep originals in R2 and serve resized WebP/AVIF versions from cache.

2

u/Helpful_Essay_6258 4h ago

Buy an old office desktop (mine cost 30€). Point the domain to that and build the site there. Only cost is electricity and domain yearly cost

1

u/Longjumping_Alarm_25 4h ago

That stack is solid for what you're describing — the other comments have the domain and hosting part covered. One thing I'd add, since minimal downtime is one of your priorities: even a good host can fail quietly. A broken deploy, a Worker change, or an expired cert can take a client site down and you'd only find out when someone complains. It's worth having a simple external check that pings the site (and the contact form) every few minutes and alerts you, so you hear about it first. Doesn't need to be anything fancy — even a basic uptime monitor does the job.

1

u/RatherNerdy 4h ago

Shared hosting would be fine for this. I'm guessing low traffic counts, so you can eat up anyone of storage on those

1

u/ravi_bitragunta 4h ago

Cloudflare - Use claude code and it will do the entire setup and optimizes for you.

It's more than good and should serve you well. Get the set up reviewed once, pay if needed some 100$ or something and you are sorted. 5 - 10$ a month at max.

Use native cloudflare for image optimization and image service. Get gemini apis and ask claude to link that to your cloudflare workers for any ai based workflows

1

u/ResidentPomegranate6 4h ago

resize at upload and store avif/webp variants in r2 next to the original. decoding in a worker hits the cpu limit, and caches do the heavy lifting anyway.

1

u/nimaco_dev 3h ago

your plan sounds fine. heads up on netlify's free plan though, it's credit based now and every deploy eats credits. i burned through a month's worth in a few days

for a photo site cloudflare pages has been way more relaxed in my experience. domain can live anywhere, just point it with A/CNAME records

and compress/resize the images before upload, keeps things much simpler

1

u/AZTechSolutions 3h ago

Your stack is solid, and a couple of things that haven't been covered yet:

On your edit about hosting in India: the registrar doesn't decide where the app is hosted or how fast it loads — DNS and hosting are separate, so a domain bought from Cloudflare Registrar can point at anything, anywhere. Cloudflare also has edge locations across India, so visitors there hit a nearby PoP either way, which actually makes this stack a good fit for an Indian audience. The real Hostinger catch is renewals: the first year is cheap, then it jumps to 3–4x. Cloudflare Registrar sells at wholesale cost, so the renewal price is the same every year.

On hidden costs — the headline prices are honest, but the metered bits are what catch people on image-heavy sites:

- R2 storage is cheap, but Class A operations (uploads, lists) are billed per 1,000. Generating 3–4 thumbnails per photo means 3–4 writes per upload, plus listing calls from your admin panel. Still pennies at small scale, just worth knowing.

- Workers paid is $5/mo for 10M requests, fine — but image transformations are billed separately if you use them.

- D1's free tier caps at 10 GB with daily read/write limits; fine for gallery metadata, but export backups regularly. R2 has no built-in versioning like S3, so treat the bucket as the live copy, not your only copy — keep originals safe elsewhere too.

For image delivery, the biggest win after resizing at upload is caching: serve your variants with long Cache-Control headers (public, max-age=31536000, immutable) so repeat visits never touch R2 at all, and use srcset + sizes so phones don't download the 2400px version. A tiny blurred placeholder or dominant-colour background while the real image loads also makes a portfolio feel much faster than it technically is.

One last thing: for the dynamic sites, decide early whether the CMS is just you uploading photos, or clients logging in to manage their own galleries. If it's clients, you'll want proper auth and roles — that's where something like Supabase saves you a lot of wiring versus hand-rolling auth on Workers + D1.

Short version: keep the stack, move the domain to Cloudflare Registrar when you can, and budget a little for operations/transforms rather than storage or bandwidth.

1

u/retr00two 3h ago

Always separate:

  • registar (Hostinger, in your case)
  • DNS server (CloudFlare is OK)
  • host (I would avoid CloudFlare, and go for cheap VPS as Hostinger, Linode, DigitalOcean)

For heavy photos offsite them to S3/AWS Media.

My two cents.

1

u/ayan_zp666io 3h ago

First proxy you whole traffic via cloudflare (orange Cloud) , R2 is fine no egress, use image transformations , don't upload or store raw image , compress those , use .webp , you can use AWS lamda also , it's always free tiar is very well. This will reduce the file size , saves storage cost,

1

u/Business-Department7 2h ago

I'd skip Hostinger for the domain since the year-two renewal jump is steep, and stick with Porkbun or Cloudflare Registrar. For R2 photo galleries, give each processed file a content-hashed name with `Cache-Control: public, max-age=31536000, immutable` so repeat views hit Cloudflare's edge cache instead of racking up Class B reads.

1

u/Jeffrey_Richards_ 1h ago

Why use a hosting provider for the domain? Use PorkBun if you don't want it to directly through CloudFlare for some reason. Or if you don't mind having it all through CloudFlare, use CloudFlare.

•

u/True-Escape-2832 15m ago

For client sites, the stack matters less than who owns what. I'd register domains in the client's name (or at least make them a co-owner), because transferring a domain later when someone leaves is a headache. For static portfolios, Pages plus R2 is great. No egress fees really helps image-heavy sites. Resize and convert images to WebP/AVIF at upload so you're not serving 8MB photos. For the dynamic ones, I'd use a simple headless CMS rather than building a custom backend on Workers. Photographers mostly just want to upload a gallery and edit some text. Low maintenance beats clever. And put renewal dates in your calendar, not just the client's.

•

u/jesseditson 9m ago

Generally this looks right - you'll likely run into some complexity around uploading to R2, as you'll need to set up your own authenticated API that uses the worker API to transmit files, use an S3-compatible tool, or manually upload files. But R2 doesn't charge egress so it will be very cheap for your use case unless you're constantly uploading huge amounts of data. If your app is read-heavy, R2 is the right choice.
Cloudflare provides image optimization services, which are also inexpensive. You shouldn't need a database at all IMO, if you do that will be the primary speed and cost bottleneck. Regardless of where you host, the DB will be the slow and latency-heavy part of the stack should you choose to include one. You can use D1 for lightweight storage but it's not really appropriate for something like a PHP app that expects to be able to query at request time. But what you're describing is a site that doesn't change unless someone changes it (e.g. arbitrary users can't create accounts), so you should be able to omit DB entirely and keep things fast and cheap.
Also note that cloudflare pages doesn't really exist anymore, they're just workers now - but the workflow is almost identical so just read docs they'll guide you to the latest patterns.

At Archival we abstract a lot of this stuff, would be happy to help you build something similar or use our platform if it's easier.