Host your blog on subdirectory path on typetale.app

This guide outlines the required steps and configurations to serve a Ghost blog hosted on typetale.app under a subdirectory (e.g., yourdomain.com/blog).

Host your blog on subdirectory path on typetale.app

This guide outlines the required steps and configurations to serve a Ghost blog hosted on typetale.app under a subdirectory (e.g., yourdomain.com/blog), while your main website continues operating independently under yourdomain.com. The configuration demonstrates an Nginx reverse proxy, but the principles apply to other reverse proxies.

⚠️
Setting up a proxy requires a solid understanding of the web infrastructure. It is recommended to proceed only if you or someone on your team possesses the technical expertise necessary to troubleshoot and resolve any issues that may arise during the process.

1. Provision the Ghost Site

Provision a Ghost blog on typetale.app. For the purposes of these instructions, assume typetale.app provisions the blog at demo.ontypetale.com

2. Configure Reverse Proxy on yourdomain.com

On yourdomain.com’s web server, configure a reverse proxy that forwards all /blog traffic (including subpaths) to demo.ontypetale.com. Here is the recommended Nginx configuration:

server {
    server_name yourdomain.com;

    # ... (existing site configuration)

    location /blog/ {
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host demo.ontypetale.com;
        proxy_pass https://demo.ontypetale.com;
        proxy_redirect off;
    }

    listen 443 ssl;
    ssl_certificate /path/to/your/ssl/certificate.pem;
    ssl_certificate_key /path/to/your/ssl/certificate_key.pem;
}

This setup transparently proxies all requests to /blog and subpaths (e.g., /blog/post-title) to demo.ontypetale.com while maintaining correct header information for Ghost to generate absolute URLs and track original clients.

3. Essential Headers

The following headers are required for Ghost's subdirectory routing to work seamlessly:

  • X-Forwarded-Proto: should always indicate https (or http, as appropriate)
  • X-Forwarded-Host: must be set to yourdomain.com
  • X-Real-IP: client's actual IP address
  • X-Forwarded-For: client IP, supports chained proxies
  • Host: must be set to demo.ontypetale.com

This header setup keeps the Ghost instance aware of the true request origin and path context.

4. Notify typetale.app Support

Once the proxy is configured, inform typetale.app support that the instance will operate behind a subdirectory proxy. This is necessary because some platform settings (including canonical URLs and routing base) may need to be adjusted on their end.

5. Verification and Testing

  • Navigate to https://yourdomain.com/blog and verify that blog content loads correctly, including all assets, static files, and deep URLs (e.g., https://yourdomain.com/blog/some-article).
  • The Ghost Admin interface will be available at https://yourdomain.com/blog/ghost if the proxy passes through that path as well.
  • Check that canonical URLs, RSS feeds, and sitemaps use the subdirectory path.

6. Summary Table

Application DomainProxy SubdirectoryMandatory Proxy Headers
yourdomain.com/blogX-Forwarded-Proto, X-Forwarded-Host, X-Real-IP,
X-Forwarded-For, Host

This approach enables an organization to present editorial content via Ghost in a cohesive, SEO-friendly format inside their main domain, without intermixing infrastructure or deployments between the main app and the Ghost platform.