Important Notice: Please be aware that this FAQ entry covers a technically advanced topic that requires knowledge of server administration. If you are not familiar with these concepts, consider seeking the assistance of a system administrator or IT specialist to ensure the setup is carried out correctly and securely.


To serve your Pageflow content alongside the existing content of your main website, you might want to integrate your stories in a subdirectory (e.g., mydomain.com/stories/my-story) rather than using a separate subdomain like story.mydomain.com/my-story (as described in the standard custom domain configuration).


This approach offers several benefits including improved SEO and a unified user experience where your Pageflow stories appear as part of your main website. This can be achieved using a reverse proxy server that forwards requests to your Pageflow stories while keeping them under your main domain.


Step 1: Choose and configure a reverse proxy server

Select a suitable reverse proxy server software for your needs. Popular options include Nginx, Apache HTTP Server, and HAProxy. The choice will depend on the current technical setup of your website. Install and configure the proxy server on your web server.


Step 2: Configure the proxy to forward story requests

Update your proxy server configuration to forward requests from your chosen subdirectory to your Pageflow account. Here's an example configuration for Nginx:

location /stories/ {
    proxy_pass https://<your_pageflow_account_name>.pageflow.io/;
    proxy_set_header Host <your_pageflow_account_name>.pageflow.io;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header X-Forwarded-Proto $scheme;
    proxy_set_header X-Forwarded-Host $host;
}

Replace <your_pageflow_account_name> with the name of your Pageflow account.


For Apache HTTP Server, you would use:

ProxyPreserveHost On
ProxyPass /stories/ https://<your_pageflow_account_name>.pageflow.io/
ProxyPassReverse /stories/ https://<your_pageflow_account_name>.pageflow.io/


Step 3: Test the basic proxy configuration

After configuring your proxy server:

  1. Restart your proxy server to apply the configuration changes
  2. Access one of your published Pageflow stories through your main domain (e.g., mydomain.com/stories/my-story)
  3. Verify that the story loads correctly


Step 4: Contact Pageflow support for canonical URL configuration

Important for SEO: To ensure search engines index your stories under your proxy URLs rather than the original Pageflow URLs, please create a support ticket so we can configure the canonical URL prefix used in the metadata of your entries. This ensures proper SEO and social sharing functionality.


When creating the support ticket, please provide:

  • Your Pageflow account name
  • The full domain and path where your stories will be accessible (e.g., mydomain.com/stories/)


Once this configuration is applied by our support team, the canonical URLs and meta tags in your stories will automatically reflect your custom domain path for improved SEO.


Additional considerations

SSL/TLS certificates: Ensure your main domain has valid SSL certificates, as some features of Pageflow require the page to be served over HTTPS.


Caching: Consider implementing appropriate caching headers for your Pageflow stories to improve performance while ensuring content updates are reflected promptly.


Security: Review your proxy configuration to ensure it follows security best practices and doesn't expose sensitive information.


SEO optimization: Consider setting up Google Search Console and Bing Webmaster Tools to monitor your stories' search performance and submit sitemaps that reference your proxy URLs for better search engine indexing.