Skip to main content

Setting Up a Reverse Proxy: Provider-Specific Guides

Updated this week

What is a Reverse Proxy?

A reverse proxy is a piece of web server software that sits between your visitors and your server. It allows you to host Psyke pages inside a subfolder of your existing website β€” for example, yourdomain.com/resources β€” without moving your whole site. Search engines see all of this content as part of your main domain, which is great for SEO.

When to Use a Reverse Proxy vs. a Subdomain

Use a reverse proxy if you want your Psyke pages to appear inside your existing site's URL structure (e.g. yourdomain.com/pages). Use a subdomain if your website infrastructure makes a reverse proxy difficult to configure (e.g. you use a hosted website builder like Webflow or Squarespace).

What Psyke Provides

In your Psyke dashboard under Settings β†’ Domain, you will find your unique Psyke origin URL. This is the address your reverse proxy will forward traffic to. It looks something like yourworkspace.psyke.co.

NGINX

NGINX is a popular open-source web server. Add the following block inside your NGINX configuration file (nginx.conf or a file in /etc/nginx/sites-enabled/):

location /pages/ {
  proxy_pass https://yourworkspace.psyke.co/;
  proxy_set_header Host yourworkspace.psyke.co;
  proxy_set_header X-Real-IP $remote_addr;
  proxy_ssl_server_name on;
}

Replace /pages/ with your chosen subfolder and yourworkspace.psyke.co with your actual Psyke origin URL. Reload NGINX with sudo nginx -s reload.

Apache

In your Apache configuration (usually .htaccess or a VirtualHost block), add:

ProxyPass /pages/ https://yourworkspace.psyke.co/
ProxyPassReverse /pages/ https://yourworkspace.psyke.co/
ProxyPreserveHost Off

Make sure the mod_proxy and mod_proxy_http modules are enabled. Restart Apache to apply the changes.

Netlify

In your project's netlify.toml file, add:

[[redirects]]
  from = "/pages/*"
  to = "https://yourworkspace.psyke.co/:splat"
  status = 200
  force = true

Deploy the change and Netlify will forward requests automatically.

Vercel

In your vercel.json file, add:

{
  "rewrites": [
    { "source": "/pages/:path*", "destination": "https://yourworkspace.psyke.co/:path*" }
  ]
}

Testing Your Configuration

After setting up the proxy, visit your subfolder URL in a browser (e.g. yourdomain.com/pages). You should see your Psyke pages loading. If you see a 502 or 404 error, double-check the origin URL and that your proxy module is enabled.

Did this answer your question?