Skip to main content
New Pages Integration

Nginx Reverse Proxy Setup for Similar AI New Pages

Serve Similar AI pages under your own domain subfolder using an Nginx reverse proxy. Three steps, no downtime.

1

Define Your Folder Name

Pick a short URL path that will hold your Similar AI pages. Most teams choose something like /p/. This becomes the subfolder on your domain where visitors will see the generated pages - for example, client.com/p/.

Keep it short and memorable. The folder name is shared with the Similar AI team during onboarding so we can configure your hosted subdomain to match. See the New Page onboarding checklist for the full setup flow.

2

Add the Nginx Configuration

Open your Nginx config file for the relevant server block and add a location directive. The example below assumes your site is client.com and you want pages served at client.com/p/.

location /p/ {
    resolver 1.1.1.1 valid=3600s;
    proxy_ssl_server_name on;
    proxy_set_header Host client_com.page.similar.ai;
    proxy_pass https://client_com.page.similar.ai;
}
  • -resolver - uses Cloudflare DNS (1.1.1.1) with a one-hour TTL so Nginx can resolve the upstream host at runtime.
  • -proxy_ssl_server_name - enables SNI so the TLS handshake includes the correct hostname.
  • -proxy_set_header Host - tells the upstream server which tenant site to serve. Replace client_com with your actual tenant identifier.
  • -proxy_pass - forwards requests to the Similar AI page host over HTTPS.

Using Cloudflare instead of Nginx? Follow the Cloudflare proxy integration guide for a Workers-based approach.

3

Test and Reload Nginx

Validate your configuration syntax first, then restart the service to apply changes.

nginx -t
systemctl restart nginx

If nginx -t reports any errors, fix them before restarting. Once the service is back up, visit client.com/p/ in your browser to confirm the pages load correctly under your domain.

Frequently asked questions

Why do I need an Nginx reverse proxy for Similar AI new pages?

The Nginx reverse proxy lets the New Pages Agent's generated content appear under your own domain subfolder (for example, yourdomain.com/guides/) rather than a separate subdomain. This ensures search engines attribute the SEO value of those pages directly to your root domain.

What does a typical proxy_pass configuration look like for Similar AI?

You add a location block in your Nginx server config that forwards requests for your chosen subfolder to the Similar AI origin endpoint, using the proxy_pass directive along with appropriate proxy_set_header lines for host and forwarding. The guide on this page provides a ready-to-use configuration snippet you can drop into your existing server block.

How do I apply the Nginx changes without downtime?

After editing your nginx.conf or the relevant site config file, run nginx -t to validate the syntax before applying anything. If the test passes, issue nginx -s reload to apply the new proxy rules gracefully without dropping active connections.

Will the reverse proxy affect my existing site routes?

No - the location block is scoped to the specific subfolder you designate for Similar AI new pages, so all other routes continue to be handled by your existing Nginx configuration. It's best practice to place the Similar AI location block after your more specific existing rules to avoid conflicts.

Does Similar AI's New Pages Agent require any special headers to work through the proxy?

Yes, the New Pages Agent expects the original Host header to be forwarded so it can render the correct domain context for each page. You should include proxy_set_header Host $host and proxy_set_header X-Forwarded-For $remote_addr in your location block, as shown in the configuration guide.

Ready to Publish New Pages on Your Domain?

Similar AI generates SEO-optimized pages and serves them through your existing infrastructure. Set up takes minutes.