Embedding site-builder pages into your site via NGINX
Published on 2025-10-12
Integrating a page created in an external website builder into your domain allows you to extend functionality and maintain a consistent interface style.
This article explains how to use an NGINX reverse proxy to embed pages from an external service (for example, example.website-builder.com) into your site your-main-site.com at paths /path1/ and /path2/.
⚙️ How it works
NGINX forwards requests from your domain to the external site, acting as an intermediary between the user and the builder service.
Example:
/path1/→ displays the pagehttps://example.website-builder.com/partners/path2/→ displays the pagehttps://example.website-builder.com/
The user remains on your domain (your-main-site.com), while the external content is loaded through the proxy.
🧩 Key configuration elements
| Component | Purpose |
|---|---|
| proxy_pass | Forwards requests to the external resource |
| proxy_set_header | Passes original headers and client IP |
| proxy_redirect | Rewrites URLs and links |
| proxy_cookie_domain / proxy_cookie_path | Changes cookie domain and path |
| proxy_buffers, timeouts | Performance and memory settings |
📜 NGINX configuration
server {
listen 443 ssl;
server_name your-main-site.com;
# SSL-сертификаты
ssl_certificate /path/to/your/certificate.crt;
ssl_certificate_key /path/to/your/private.key;
# ---------- /path1/ ----------
location /path1/ {
proxy_pass https://example.website-builder.com/partners;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host example.website-builder.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_ssl_server_name on;
proxy_redirect off;
proxy_redirect https://example.website-builder.com/partners /path1/;
proxy_cookie_domain example.website-builder.com your-main-site.com;
proxy_cookie_path / /path1/;
proxy_connect_timeout 5s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
proxy_buffers 32 16k;
proxy_busy_buffers_size 32k;
client_max_body_size 20m;
}
# ---------- /path2/ ----------
location /path2/ {
proxy_pass https://example.website-builder.com/;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_set_header Host example.website-builder.com;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Host $host;
proxy_ssl_server_name on;
proxy_redirect off;
proxy_redirect https://example.website-builder.com/ /path2/;
proxy_redirect http://example.website-builder.com/ /path2/;
proxy_cookie_domain example.website-builder.com your-main-site.com;
proxy_cookie_path / /path2/;
proxy_connect_timeout 5s;
proxy_send_timeout 30s;
proxy_read_timeout 30s;
proxy_buffers 32 16k;
proxy_busy_buffers_size 32k;
client_max_body_size 20m;
}
}
🚀 Implementation steps
1. Preparation
- Make sure NGINX is installed.
- You have administrator privileges and a valid SSL certificate for
your-main-site.com. - Check the availability of the external resource
example.website-builder.com.
2. Adding the configuration
Create the file:
sudo nano /etc/nginx/conf.d/website_builder.conf
Paste the block above and save the changes.
3. Check and reload
sudo nginx -t
sudo systemctl reload nginx
4. Testing
Open:
Verify that pages, links, and cookies load correctly.
🧠 Recommendations
| Area | Advice |
|---|---|
| Security | Use HTTPS on both ends, configure Content-Security-Policy, X-Frame-Options headers. |
| Performance | Tune timeouts, enable caching (proxy_cache), and optimize buffer sizes. |
| Monitoring | Enable access_log and error_log for traffic analysis. |
| URL compatibility | Verify all relative links are correct after proxying. |
🧩 Common issues and solutions
| Problem | Possible solution |
|---|---|
| 404 Not Found | Check the correctness of proxy_pass and the availability of the external site. |
| Redirect loops | Ensure proxy_redirect does not conflict with external redirects. |
| Cookies not preserved | Configure proxy_cookie_domain and proxy_cookie_path correctly. |
| Mixed content | All resources must be loaded over HTTPS. |
| Slow responses | Increase timeouts or optimize the external server. |
✅ Conclusion
Setting up a reverse proxy with NGINX lets you embed pages from a website builder into your domain while preserving a unified interface and style. This integration:
- creates a seamless user experience;
- simplifies deploying external landing pages or partner pages;
- increases security and control over content.
By following the steps above, you can integrate an external site into your project in minutes, without complex logic or additional code.
Related reviews
As always, prompt and high-quality! I turn to Mikhail for server issues.
Vadim_U · Moving n8n to another server
An established customer2025-11-14 · ⭐ 5/5
As always, prompt and high-quality! For server-related issues, I turn to Mikhail.
Very pleased with working with Mikhail. Any task, even one that seems difficult at first, is executed to a high standard thanks to him! Thank you )
Dr-zelenin · VPS setup, server setup
2025-11-11 · ⭐ 5/5
Very satisfied with working with Mikhail. Any task, even one that seems difficult at first glance, becomes, thanks to him, implemented to a high standard! Thank you)
Thanks to Mikhail for his professionalism. I recommend him. He was very helpful in helping me understand Docker.
Vadim_U · VPS setup, server setup
A customer who has settled in2025-11-10 · ⭐ 5/5
Thanks to Mikhail for his professionalism. I recommend him. He was a great help in getting to grips with Docker.
Mikhail is an expert. He quickly figured it out and fixed the problem.
Vadim_U · VPS setup, server setup
An acclimated customer2025-11-10 · ⭐ 5/5
Mikhail is an expert. Quickly figured it out and resolved the issue.
Comes through for any problem — I recommend it!
AlekseiDotsenko · VPS setup, server setup
Power buyer2025-11-05 · ⭐ 5/5
Comes to the rescue with any problems, I recommend!
Mikhail helped set up the website very quickly. I would’ve definitely been fiddling with it all day. It’s great when a professional saves your time and delivers high-quality work. I recommend him!
N_Konstantin · VPS setup, server setup
An established customer2025-10-21 · ⭐ 5/5
Mikhail was very prompt in helping set up the website. I would definitely have been tinkering with it all day. It's nice when a professional helps save your time and does the work at a high level. I recommend him!