Snoika
Platform · Integrations

Nginx reverse proxy for Snoika pages

Snoika pages can run on your own domain through the Nginx server you already use. You add proxy rules that send requests for Snoika pages to Snoika's origin, and every other request keeps going to your existing site. Most guides for an nginx reverse proxy subdirectory cover a single folder. This connection covers the whole website instead, and nothing gets installed in your CMS. To start, ask Snoika's team for your origin and configuration values.

CDN connectionsLast 30 days
CHATGPT VISIBILITY10×1StopVAT, 7 weeks
INBOUND LEADS3–4/day3DPrinterOS
LANGUAGES135+with regional variants

Trusted by

1StopVAT logoABS Technologies logoVespia logoAgrello logo3DPrinterOS logoRedDogFish logoLappa logoEGS logoInvestViable logoDoocat logoTNT Wellness logoSmartbet logoAgritopia logoxtrnd logoGreen Bay Remodeling logoWearfits logoad agents logoAcudo logoConnect Point logoBlissed logoeFarm logoEvolved Ideas logoAlpa Kids logoDental Art Clinic logoPhoto9 logo
01

Proxy rules for Snoika pages

You need two location blocks in your existing `server` block. The first sends Snoika's pages to Snoika's origin with `proxy_pass`. The second leaves every other request on your current backend. Snoika's team supplies the origin and the configuration values, so the placeholders below are the only parts you change.

server {
    listen 443 ssl;
    server_name example.com;

    # Pages Snoika manages (prefix and origin from Snoika's team)
    location ^~ <SNOIKA_PAGE_PREFIX> {
        proxy_pass https://<SNOIKA_ORIGIN>;
        proxy_set_header Host <SNOIKA_ORIGIN_HOST>;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_ssl_server_name on;
    }

    # Every other request: existing site, unchanged
    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_set_header Host $host;
    }
}

Nginx is one of several supported proxy setups. Others include a Cloudflare Worker and AWS CloudFront with Lambda@Edge, and Snoika prepares a custom setup on request. Your code and hosting stay exactly as they are.

02

How the proxy routes pages

Nginx picks a location block for each request and forwards the request to the matching upstream. Routing happens on your server before your application sees anything. So your CMS never knows Snoika pages exist.

RequestMatched blockServed byWhat Nginx changes
A page Snoika managesSnoika prefix blockSnoika's originHost header, forwarded headers
An asset for a Snoika pageSnoika asset blockSnoika's originHost header
Any other page or file`location /`Your existing siteNothing

The `^~` modifier matters here. It tells Nginx to stop searching once this prefix matches, so the regex blocks further down your config never get a look at Snoika's requests.

03

How proxy_pass rewrites paths

Whether `proxy_pass` rewrites the path depends on one detail: whether you put a URI after the host. If you write `proxy_pass https://origin;` with no path, Nginx forwards the original request path untouched. If you write `proxy_pass https://origin/;` with a trailing slash, Nginx swaps the matched location prefix for that slash.

That one character decides whether Snoika's origin receives the full path or a shortened one. Use the form Snoika's team specifies. Also, a regex location can't carry a URI in `proxy_pass`, and Nginx refuses to load a config that tries. When you set the origin through a variable, add a `resolver` line so Nginx can look up the hostname at runtime.

04

Setting the Host header correctly

Set `Host` to the origin hostname Snoika's team gives you, and pass your public domain in `X-Forwarded-Host`. By default Nginx sends the hostname from the `proxy_pass` line. Plenty of configs override that with `$host`, though, and the origin then receives a domain it doesn't recognize. You'll see that as a 404 or a TLS mismatch.

`proxy_ssl_server_name on` sends the right name during the TLS handshake (SNI), which HTTPS origins need. `X-Forwarded-Proto` tells the origin the visitor arrived over HTTPS, so generated links don't fall back to plain HTTP. Check one rendered page and confirm its canonical URL shows your domain.

05

Preserving static asset routes

Give Snoika's stylesheets and scripts their own proxied location so they don't fall through to your existing site. Route its images through that location too. A Snoika page loads files from paths outside its page prefix. Without a matching block, `location /` catches those requests, and your backend returns a 404.

Ask Snoika's team for the asset prefix and add it as a second `^~` block with the same `proxy_pass` and `Host` lines. Leave Snoika's cache headers alone unless you have a reason to change them. Then open a page with your browser's network panel and confirm every file returns 200 from the proxied path.

06

Common rewrite mistakes to avoid

The handful of small config errors behind most broken setups each show a distinct symptom that points straight at the cause.

A regex block steals the request

Existing configs contain a block like `location ~* \.(css|js|png)$` for caching. Nginx checks regex blocks after plain prefixes, so the regex wins unless you mark Snoika's prefix with `^~`. When pages render without styles, look here first.

The trailing slash doubles or drops a path segment

A slash added or removed in `proxy_pass` changes the forwarded path. The origin then gets a URL that doesn't exist. Compare the path in your access log with the path in the browser.

Redirects point at the origin domain

When the origin answers with a redirect, the `Location` header can name the origin host. Visitors then leave your domain. Set `proxy_redirect` to map the origin host back to yours if you see this.

07

Testing your config locally

Run `nginx -t` before every reload, since it catches syntax errors and illegal `proxy_pass` URIs. Then reload with `nginx -s reload` and request a Snoika page straight from the server:

curl -I -H "Host: example.com" https://127.0.0.1<SNOIKA_PAGE_URL> -k

A 200 response with Snoika's headers confirms the routing works. Then request a normal page from your site and confirm nothing about it changed. To test in a browser before DNS points anywhere new, map your domain to the server in your hosts file.

Check the extras that travel with each page as well. Every page Snoika publishes carries schema markup and a canonical URL. Each page also carries Open Graph tags and internal links, with an entry in the sitemap. It also has a Markdown twin for AI crawlers and an `llms.txt` index. Request the Markdown twin and the `llms.txt` file through your domain, because crawlers only find them if the proxy serves them.

08

Verifying with AI visibility tools

For the final check, confirm that pages cited in AI answers show your domain. Snoika tracks ChatGPT and Google AI Overviews, and it records the pages each one cites along with mentions and citations. If a cited URL shows your domain, the proxy is serving pages the way crawlers see them.

Tracking runs week by week, so give new pages a few cycles before you judge. Share of voice and competitor positions show whether the pages are gaining ground. Prompts come from your content map, and you can add custom prompts for the queries you care about.

09

How to connect Nginx

Your next step is to get your origin and configuration values from Snoika's team, then add the two location blocks to a staging server first. Once the routes test clean, you can schedule finished pages, or schedule AI content generation with automatic publishing for pages that don't need review. You still approve every page in the dashboard. Snoika builds page templates that match your site and sets up GA4 and Google Tag Manager events, so you can track the leads from each page. Snoika runs the Nginx reverse proxy as a whole-site connection with human review on top. Connect Nginx.

See every platform Snoika connects to in all integrations.

FAQ

Add a proxied location for the managed page prefix inside your existing server block, and keep location / pointing to your current backend. Assets outside the page prefix need a separate proxied location so requests don't reach the wrong backend.

Use the supplied origin and configuration values to set up the proxy rules on a staging server first. Run nginx -t before reloading with nginx -s reload. Then test a managed page and an existing page to confirm both routes work.

Set proxy_set_header Host to the supplied origin hostname, and use X-Forwarded-Host to pass your public domain. If an existing rule sets Host to $host, replace that value in the managed-page location so the origin receives the hostname it expects.

Give the supplied asset prefix its own ^~ location with the same proxy_pass and Host settings as the page location. This prevents matching requests from reaching existing regex rules. Check the browser's network panel to confirm each file returns 200.

The Nginx reverse proxy setup described here works as a whole-site connection rather than a single-folder proxy. It routes managed pages and their separate asset paths to the origin, while other requests continue to your existing site.

See how AI talks about your brand