Back to articles
Solved: A Problem with Indexing for Ghost Site?
How-ToDevOps

Solved: A Problem with Indexing for Ghost Site?

via Dev.to TutorialDarian Vance

🚀 Executive Summary TL;DR: Ghost sites often fail to index on Google due to incorrect canonical URLs (HTTP instead of HTTPS) caused by misconfigured reverse proxies. This issue is resolved by correctly configuring the reverse proxy (like Nginx) to pass X-Forwarded-Proto and Host headers, or by directly setting the url in Ghost’s config.production.json , or via CDN rules. 🎯 Key Takeaways Ghost generates canonical URLs and sitemaps based on information from its reverse proxy; if the proxy communicates internally via HTTP but serves externally via HTTPS, Ghost will incorrectly generate http:// URLs. The most robust solution involves configuring the reverse proxy (e.g., Nginx) to explicitly pass X-Forwarded-Proto $scheme; and proxy\_set\_header Host $host; to Ghost, ensuring it dynamically builds correct HTTPS URLs. Temporary or emergency fixes include hardcoding the https:// URL in Ghost’s config.production.json or using CDN-level rules (like Cloudflare Transform Rules) to inject the corr

Continue reading on Dev.to Tutorial

Opens in a new tab

Read Full Article
1 views

Related Articles