Fill the Server: 80% off your first 4 monthly invoices, monthly billing. Ends Nov 30, 2026. 25 spots in this batch.FILL25
Fill the Server, annual: about 29.63% off your first annual invoice. Ends Nov 30, 2026.FILL25Y
Fill the Server, 2 year term: about 15.69% off your first biennial invoice. Ends Nov 30, 2026.FILL25B
Fill the Server, 3 year term: about 11.11% off your first triennial invoice. Ends Nov 30, 2026.FILL25T
80% off your first 3 months, monthly billing. Ends Dec 25, 2027.3MONTHS80
50% off your first annual Shared term. Ends Dec 31, 2027.50SHARED
Shared Starter, 3 year term: C$105.84 total.MOOSE294
20% off your first 3 monthly VPS invoices. Ends Dec 31, 2027.20VPS3
25% off your first annual base VPS term.25VPS

← All guides

Security

HTTPS redirect mistakes: loops, chains and host changes that hurt a site

Published August 2026 · 2 min read · Updated 2026-09-05

HTTPS redirect mistakes usually come from several layers trying to canonicalize the same request without agreeing about scheme or hostname. A redirect loop, unexpected downgrade, or wrong-host jump is easier to fix when you capture the chain and assign one layer primary ownership of each rule.

Capture every status and Location header

Use curl or browser network tools to follow the redirect chain from HTTP and HTTPS, apex and www, and any legacy hostname. Write down the exact sequence of status codes and Location headers.

Loops often reveal two components alternating between different canonical beliefs.

Account for reverse-proxy scheme headers

When TLS terminates at a load balancer, CDN, or reverse proxy, the origin may see plain HTTP while the visitor used HTTPS. Configure trusted forwarded-protocol handling so the application does not redirect an already-secure request back through the proxy.

Trust proxy headers only from the controlled proxy path.

Remove duplicated redirect ownership

A CDN rule, nginx/Apache rule, WordPress plugin, application framework, and control panel can all enforce HTTPS/www. Pick a clear canonical layer and simplify the others.

Preserve path and query strings intentionally and avoid broad regexes that redirect assets or challenge endpoints incorrectly.

Test permanent status only after behavior is correct

Browsers and search engines can cache permanent redirects. Use temporary responses while debugging, then publish the intended permanent code and verify canonical tags/sitemap match the final URL.

  • Capture the whole chain.
  • Handle proxy scheme correctly.
  • Choose one canonical owner.
  • Promote to permanent only after testing.

Next step

Find conflicting HTTP-to-HTTPS and hostname redirects across proxies, servers and applications, then reduce the path to one intentional canonical destination.

See the DotMoose security approach

Keep reading

Related guides.

Content Security Policy rollout: build CSP from the resources a site really uses

Inventory scripts, styles, frames and connections, start with reporting, reduce unsafe allowances and enforce CSP only after normal user paths still work.

Read the guide

HSTS rollout planning: enable strict HTTPS without locking in a mistake

Stabilize HTTPS first, choose max-age carefully, cover subdomains deliberately and understand preload consequences before making HSTS hard to reverse.

Read the guide

Security header rollout: add browser protections without breaking the site

Inventory current behaviour, deploy security headers one at a time, use report-only modes where available and verify login, checkout and embedded content.

Read the guide

More security guides

We will handle the move. You check it first.

Your current site stays online until your new one is ready. You approve the copy first, and if anything is not right we switch you back right away. The price you pick is the price you renew at.

Start my free moveSee plans and prices
See pricesFree move