How Weglot
technically works

A developer’s look at Weglot’s reverse proxy solution and JavaScript integration.

Weglot - Product imageLines weglot

Reverse proxy solution

Configure Weglot’s Content Delivery Network for a fully translated website in minutes. Choose between our "subdomain" and "subdirectory" based on how you want the translated pages to appear.

For example, "https://fr.yoursite.com" or "https://yoursite.com/fr." For subdomain mode, you'll edit your DNS settings to create specific subdomains for each new language and point them to the Weglot servers.

For subdirectory mode, you can choose between 2 integrations:

Standard icon

Standard Subdirectory

You will point your main DNS directly to Weglot servers.

Puzzle icon

Custom Subdirectory

If you use your own reverse proxy (CDN, Nginx, ...), you can configure routing to only send the language-related URL to Weglot. This feature is available for Enterprise only.

Any request for a translated version of your website will deliver blazing fast results to your customer in their native language. Plus, a layer of cache on top of the Weglot translation API means if the exact same translation request is sent twice, it will remember the answer and send it back to you instantly. Weglot’s reverse proxy solution provides you with a fully SEO-friendly version of your website that’s easily indexed by global search engines.

The same applies to AI crawlers. Because translations are written into the page source before it reaches the visitor, the bots behind ChatGPT, Claude, Perplexity and Google's AI tools read a complete translated page rather than an untranslated one. But for this to happen, your original site needs to serve its content server-side. A site built purely in React, Vue or Angular without a framework like Next.js or Nuxt returns an empty page to crawlers in any language; this is something translation doesn't change.

Subdomain
1

Website
Visitor

Website visitor asks for a page of your website in French. The subdomain fr. points to the Weglot Reverse Proxy Server.

2

Weglot
Reverse Proxy

Weglot Reverse Proxy makes a HTTPs call to your original website.

3

Your
Origin

Your website sends back the original HTML page (non-translated).

4 & 5

Weglot
API

Weglot Reverse Proxy sends the content of that page to Weglot API to retrieve the translations

6

Response

Weglot Reverse Proxy sends back a response to the visitor’s browser

Subdirectory
1

Website
Visitor

Website visitor asks for a page of your website in French. The subdirectory /fr/ points to the Weglot Reverse Proxy Server.

2

Weglot
Reverse Proxy

Weglot Reverse Proxy makes a HTTPs call to your origin endpoint (An IP or a CNAME entry).

3

Your
Origin

Your website sends back the original HTML page (non-translated).

4 & 5

Weglot
API

Weglot Reverse Proxy sends the content of that page to Weglot API to retrieve the translations

6

Response

Weglot Reverse Proxy sends back a response to the visitor’s browser

Custom subdirectory
1

Website
Visitor

Website visitor asks for a translated page. The request hits your Reverse Proxy.

2

Your
Reverse Proxy

For a translated page, the request is routed to Weglot Reverse Proxy, through a URL like : render.weglot.io/htt
ps://mysite.com/fr/
accueil

3

Weglot
Reverse Proxy

Weglot RP fetches the original page by making a HTTPs call to https://mysite.com/
home (*)

4 & 5

Your
Origin

This calls lands again on your reverse proxy and goes to your origin endpoint as it's a non-translated page this time.
Weglot RP receive the original HTML page.

6

Weglot
API

Weglot Reverse Proxy sends the content of that page to Weglot API to retrieve the translations.

7 & 8

Return
Page

Weglot RP sends back a response to your reverse proxy with the translated page.
Your reverse proxy sends back the response to the browser.

(*) Please not that it's also possible to configure Weglot Reverse Proxy to fetch the original page directly on your website origin endpoint, if your origin endpoint allows it.

JavaScript integration

The Weglot JavaScript integration is the fastest and simplest way to set up translations for your website. By just copy-pasting a few lines of JavaScript, you can translate any website in seconds. It’s best used for testing, when you don’t need to be visible on global search engines or when you want to translate private content.

The translations are fetched and then inserted into the page by the browser after it has downloaded the page source.

This means the translations are not stored in any source code and therefore not detected by search engines.

Weglot - Product image integration
1

Website
Visitor

Website visitor asks for a page on your website.

2

Your
Server

Your server sends the page back to the website visitor’s browser in the original language, with a script tag calling the Weglot JS library.

3

Library

The library detects the user language, based on their choice or their locale, gathers all the content, and sends it to the Weglot Translation API.

4

Translation

The Weglot Translation API sends the translations back, and the Weglot JS library swaps the original content for the translations.

Automated features

A website translation solution with zero developer effort

Icon message

Documentation

Read more on our dedicated developer documentation

FAQ icon

Technical FAQ

Weglot proxy server reliability and availability

arrow

The Weglot proxy server is hosted on servers distributed in locations around the world. Your website visitors will have a fast, secure, and seamless experience when it comes to viewing your site in their language as they’ll be closer to the source of data. Weglot has a 99% uptime SLA.

Where does the data get stored?

arrow

Your translations are stored on the Weglot database. The Weglot database is fully backed up daily.

What data do you store?

arrow

Weglot stores all the HTML fragments it translates as well as their translations. It also stores data associated with your project settings, such as glossary rules. You can exclude translations by URL or more finely by CSS selector in order to avoid sending confidential data, such as personally identifiable information (PII), to Weglot.

By default after a project is removed at the termination of the contract, any stored data is removed after 180 days of inactivity – this can be deleted sooner upon request.

Is Weglot GDPR compliant?

arrow

Yes, no user data is stored by Weglot. Our translation database is located in AWS Frankfurt.

What are Weglot’s service hours?

arrow

Weglot’s service is 24/7 with a 99% service level guarantee.

Is it translated via proxy?

arrow

Yes. Weglot reverse proxy servers will automatically retrieve your website pages, detect the original content and swap it for translations.

Does Weglot have an API?

arrow

Yes – You can translate any content by directly calling our API. Read our API documentation for more information.

​​Which DNS entries need to be added?

arrow

It depends on what you want URLs to look like for your users.

If you want to use subdomains and have your Spanish-translated products page available on es.example.com/product, you’ll need to create 1 CNAME record per translated language and associated subdomain and point them to websites.weglot.com.

If you want to use subdirectories, and have your translated products page available on example.com/es/product, you'll need to edit your website's main DNS record and point it to Weglot's servers. You’ll get precise instructions during onboarding.

Can AI crawlers read Weglot's translated pages?

arrow

With subdomain or subdirectory integration, yes. Weglot translates server-side, so the translated text sits in the HTML your server returns. This is important as most AI crawlers, including GPTBot, ClaudeBot and PerplexityBot, read raw HTML and do not execute JavaScript. Content that only appears after the browser runs a script is invisible to them.

Do AI crawlers treat my translated pages the same way Googlebot does?

arrow

Not entirely. Googlebot renders JavaScript on a second pass and uses hreflang to match a page's language to a searcher's. Most AI crawlers don't render JavaScript, so they only read what the server returns directly. It isn't publicly documented whether or not they use hreflang, and testing suggests ChatGPT, Claude and Perplexity often return the source-language URL even when hreflang is correctly implemented.

Weglot's subdomain and subdirectory integrations give each language a dedicated URL with the translated content in the page source, and add hreflang for Google, Bing, and the AI search interfaces built on them, like AI Overviews, AI Mode, and Copilot.

Rocketship icon

Ready to get started?

Weglot is trusted by more than 110,000 website owners & developers. Start your Weglot free trial.