Custom Domains

PageGun supports three hosting modes, each with different levels of control over your domain and rendering.

Hosting Modes

ModeDomainRenderingBest For
Full HostYour domain via CNAMEPageGun rendersSimple sites, landing pages
RewriteYour domain via proxyPageGun rendersEmbedded docs within existing sites
Data ModeYour domain, your appYou renderFull control, custom frontends

Full Host

PageGun fully hosts your site. Visitors go to your domain; PageGun serves the pages.

Setup

  1. Add your domain in Project Settings → Domains.
  2. Create a DNS CNAME record:
docs.example.com  CNAME  hosting.pagegun.com
  1. Wait for DNS propagation (usually < 5 minutes).
  2. PageGun automatically provisions an SSL certificate.

Rewrite Mode

Your existing application proxies specific routes to PageGun. This lets you embed PageGun content within your own site.

Vercel

In vercel.json:

{ "rewrites": [ { "source": "/docs/:path*", "destination": "https://hosting.pagegun.com/docs/:path*" } ] }

Netlify

In netlify.toml:

[[redirects]] from = "/docs/*" to = "https://hosting.pagegun.com/docs/:splat" status = 200

Cloudflare Workers

export default { async fetch(request: Request) { const url = new URL(request.url) if (url.pathname.startsWith('/docs')) { return fetch(`https://hosting.pagegun.com${url.pathname}`, { headers: { 'Host': 'hosting.pagegun.com' } }) } return fetch(request) } }

Nginx

location /docs/ { proxy_pass https://hosting.pagegun.com/docs/; proxy_set_header Host hosting.pagegun.com; proxy_ssl_server_name on; }

Data Mode

In Data Mode, there's no domain configuration needed on PageGun's side. Your application fetches encrypted content from the CDN and renders it however you want.

→ See the Data Mode Guide for details.

SSL Certificates

For Full Host and Rewrite modes, PageGun automatically provisions and renews SSL certificates via Let's Encrypt. No manual configuration is required.

Domain Verification

When you add a custom domain, PageGun may ask you to verify ownership by adding a TXT record:

_pagegun-verify.docs.example.com  TXT  pgv_xxxxxxxxxxxxx

Verification typically completes within a few minutes.

© 2026 PageGun. All rights reserved.