HOSTING
HTTPS and proxy configuration causing ecommerce issues behind a CDN
When Magento sits behind a CDN or load balancer, wrong scheme detection causes redirect loops and insecure URLs. How to configure it correctly.
By VISIBI Hosting team·Reviewed by Saeed Ak, Co-founder & CTO·Updated 29 September 2026·6 min read
QUICK ANSWER
When Magento sits behind a CDN or load balancer, wrong scheme detection causes redirect loops and insecure URLs. How to configure it correctly.
FROM OUR ENGINEERING WORKREAL CASE
Incorrect routing and proxy configuration behind CDN and cloud infrastructure caused wrong scheme detection and inconsistent secure URLs.
KEY TAKEAWAYS
✓The app must know the original request was HTTPS.
✓Trust X-Forwarded-Proto only from your proxy.
✓Misconfiguration causes redirect loops and mixed content.
Symptoms
- Redirect loops on login or checkout
- HTTP links in HTTPS pages
- Wrong canonical URLs
- Payment callbacks failing
Fix it
Configure the web server and Magento to respect forwarded headers from trusted proxies, set secure base URLs, and test every entry point.
Common mistakes to avoid
✕Choosing hosting on price alone
✕Not testing backups until you need them
✕Sizing servers for average traffic instead of peak
✕Leaving SSL, DNS and patching to chance
HOW VISIBI CAN HELP
How we help with hosting
01Right-sizeWe size hosting for your peak traffic and platform.
02Migrate freeZero-downtime migration handled by our engineers.
03ProtectBackups, WAF, patching and monitoring included.
04Support 24/7UK engineers on call when it matters.
See hosting plans →Free · No obligation · Reply within 24 hours
Frequently asked questions
Is this common on AWS?
Yes with load balancers and CloudFront if headers aren’t configured.
Can it affect SEO?
Yes — wrong canonicals and redirects hurt indexing.
Can you check our setup?
Yes.
SA
Reviewed by Saeed Ak · Co-founder & CTO25 years engineering high-traffic ecommerce, cloud and security platforms. Written by the VISIBI Hosting team.Meet the team →
RELATED SERVICES