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
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!
The most qualified, top-notch specialist who knows his stuff.
Alexeyvodopyanov · VPS setup, server setup
Experienced buyer2025-10-21 · ⭐ 5/5
The most qualified and coolest specialist who knows their stuff
Everything is fast and high-quality
Alexeyvodopyanov · VPS setup, server setup
Experienced buyer2025-10-16 · ⭐ 5/5
Everything fast and high-quality
The task was completed in 30 minutes! I recommend!
fedinseo · VPS setup, server setup
A very powerful buyer2025-10-15 · ⭐ 5/5
The task was completed in 30 minutes! I recommend it!
Mikhail is an outstanding professional! You can tell he has a great deal of experience. The work was done precisely and on time. We had to tinker a bit because the project installed on the server wasn't perfect, but Mikhail carefully and thoughtfully guided us on what to do and how. In the end, everything worked! I recommend him to anyone who values quality.
N_Konstantin · VPS setup, server setup
A settled customer2025-10-10 · ⭐ 5/5
Mikhail is an excellent performer! You can tell he has a wealth of experience. The work was done precisely and on time. We had to tinker due to imperfections in the project that was being installed on the server, but Mikhail carefully and thoughtfully advised what to do and how to do it. In the end, everything worked! I recommend him to anyone for whom the quality of work is important!
Everything's great, as always! Fast, clear and to the point. Thanks!
Dina_Perova · VPS setup, server configuration
Established customer2025-09-18 · ⭐ 5/5
Everything's great, as always! Fast, clear and to the point. Thank you!