logo
Parslinks
Back to blog
Platform7 min read

Hosting inside Iran or abroad? A decision for web apps that needs real numbers

The question isn't where it's cheaper. It's where your users are, and who can still reach your site on the day international internet goes down.

Ehsan Yaghmori

Founder & CTO, Parslinks

Last winter, one of the teams we work with ran their home-appliance shop on a VPS in Germany. Everything was fine until the night international connectivity was disrupted for several hours. The site wouldn't load for customers inside Iran, but their SMS campaign was already scheduled, and thousands of people tapped a link that went nowhere.

Two years earlier, the same team had moved their server out of Iran because the server could no longer reach npm and every build ended in a timeout. Both decisions made sense at the time. The trouble was that neither was made with all the numbers on the table.

First, ask where your users are

This simple question is half the answer. If more than ninety percent of your users are inside Iran, as they are for most shops, service apps and internal business systems, every request to a foreign server has to cross international links and come back. That means more latency and a dependency on a route you don't control.

If your product serves users outside the country, say a SaaS whose customers are in Turkey and the UAE, the maths flips completely.

Row by row

Comparison of a server inside Iran and one abroad for an app with users in Iran

Latency: the number users feel

Round-trip time from Tehran to a domestic data centre is usually under 30 ms. To Frankfurt or Amsterdam it's 80–200 ms depending on the carrier and time of day. On a simple page that may not matter, but a product page that makes ten API calls before rendering pays that gap ten times. On mobile data at busy evening hours, the gap grows.

International disruptions

For Iranian businesses this isn't hypothetical; it's experience. In every serious disruption, sites hosted inside the country stay reachable for local users and foreign-hosted sites don't. If the disruption lands on your sale day, this row outweighs all the others.

Payment and invoices

A domestic server is paid in rials through a local bank gateway, with an official invoice; for company accounting that's no small thing. A foreign server means paying in foreign currency through a middleman, with fees and exchange-rate swings at every renewal.

Account risk

Most foreign providers are bound by sanctions law. An account opened with a proxy card and a borrowed address can be closed one day without warning, servers and backups included.

The other side: your server's access to the world

Domestic servers have their own problems. Access to npm, Docker Hub, PyPI or GitHub from inside Iran is sometimes slow or restricted, and a build that pulls packages from them can stall halfway. Foreign APIs, such as AI services or international email providers, may be unreachable or may block you.

The hybrid pattern: each part where it belongs

Not everything has to live in one place. The pattern that works for most teams in Iran:

  • The main app, API and database inside Iran: everything users need to buy, sign up and log in.
  • Services only reachable from abroad (an AI API, for example) behind a queue or a small proxy service, so that if they're unreachable, only that feature breaks, not the whole site.
  • An international version or landing page for foreign visitors on a foreign server or CDN, if you need one.

One important catch: if the server is domestic but the page still loads fonts from Google and libraries from a foreign CDN, you're still dependent on the outside world on disruption day. We cover that in keeping your site up during international outages.

Project typeRecommendationWhy
Shop or service app with users in IranInside IranLower latency and stays up during international outages
Internal business or government systemInside IranLegal requirements, official invoices, domestic access
SaaS for customers abroadAbroadUsers are outside; latency works the other way
Product dependent on a foreign APIHybridApp inside, foreign service behind a queue
Simple marketing siteLittle differenceWith a CDN and caching, both work

If your server is abroad today

Start with one question: which parts genuinely need to stay abroad? Usually fewer than you think. Then:

  1. List the pages' external dependencies (fonts, scripts, captcha, Google sign-in).
  2. Bring the app up on a domestic server or platform and test it fully on a preview URL.
  3. Move the database at a quiet hour.
  4. Lower DNS TTLs a day ahead, then switch the domain.

In short

For an app whose users are in Iran, a domestic server is the sensible default, and access to foreign resources can be managed with mirrors and the right architecture. The reverse, users in Iran and a server abroad, is a risk you don't see until the day of the outage.

Frequently asked questions

Join the discussion

No comments yet. Be the first to share your thoughts.