An HTTP to HTTPS redirect looks simple on paper: take every insecure request and send it to the secure version. In practice, the details matter. A weak setup can create redirect chains, mixed host conflicts, crawl inefficiency, broken assets, or sessions that behave differently after launch. This guide is designed as a reusable checklist for developers, IT admins, and technical site owners who need a dependable, SEO-safe website redirect plan. Use it before a migration, after a certificate renewal, when changing hosts or CDN rules, or whenever you need to test and tidy an existing HTTPS redirect setup.
Overview
The goal of an HTTP to HTTPS redirect is to make the secure URL the single canonical destination for every page, asset path, and host variation that should remain public. In most cases, that means a permanent 301 redirect from http://example.co.uk/page to https://example.co.uk/page, preserving the path and query string unless there is a deliberate reason not to.
For most production websites, forcing HTTPS is now the normal end state because it improves transport security, reduces browser trust warnings, and gives search engines a clearer preferred URL pattern. But a force HTTPS rule on its own is not the full job. You also need to decide:
- Which hostname is canonical:
wwwor non-www - Where the redirect should live: server, load balancer, CDN, platform rule engine, or application
- Whether query strings should be preserved
- How to handle old subdomains, staging hosts, and legacy entry points
- How to test for redirect chains, loops, and inconsistent status codes
A clean implementation usually has one clear hop from any non-canonical version to the final canonical HTTPS URL. For example:
http://www.example.co.uk/page→https://example.co.uk/pagehttp://example.co.uk/page→https://example.co.uk/pagehttps://www.example.co.uk/page→https://example.co.uk/page
If your current behaviour is more like HTTP to HTTPS, then HTTPS www to HTTPS non-www, you already have a redirect chain. That may still work for users, but it is less tidy for crawlers and harder to govern over time.
As a general rule, use a server-side redirect rather than JavaScript or meta refreshes for sitewide protocol changes. If you need a refresher on status codes beyond 301 and 302, see 301 vs 302 vs 307 vs 308 Redirects: When to Use Each Status Code.
Checklist by scenario
Use the scenario below that best matches your environment, then test against the shared checks later in this guide.
1. New HTTPS launch on an existing site
If your site has historically served HTTP and you are moving the main public site to HTTPS, your checklist is:
- Install a valid certificate for the production hostname or hostnames you intend to serve
- Confirm the server, CDN, or platform can terminate TLS correctly
- Choose the canonical hostname before writing redirect rules
- Create a permanent redirect from every HTTP URL to its HTTPS equivalent
- Preserve path and query strings unless there is a documented exception
- Update internal links, canonical tags, XML sitemaps, hreflang references, structured data URLs, and key feed endpoints to HTTPS
- Check mixed content, especially hard-coded image, script, CSS, font, and API URLs
- Retest forms, login flows, session cookies, and third-party callbacks
This is often the cleanest moment to collapse protocol and host decisions into one rule set. If you also need to standardise www versus non-www, do it in the same release rather than in stages where possible.
2. Existing HTTPS site with inconsistent redirects
Many websites already support HTTPS but still leak traffic through old HTTP endpoints or inconsistent host rules. In that case:
- Crawl the site and export all discovered URL variants
- Run a redirect checker against HTTP, HTTPS,
www, non-www, trailing slash variants, and common campaign URLs - Map every entry point to a single final URL
- Replace chains with a direct one-hop redirect
- Remove duplicate rules spread across application, web server, and CDN layers
- Verify that the origin and edge agree on canonical behaviour
This scenario is common after hosting changes, CMS upgrades, or partial rule migrations.
3. Reverse proxy, CDN, or load balancer setup
If TLS is terminated before the request reaches the origin, be careful. An origin server may think traffic is still HTTP unless forwarded headers are configured properly. Your checklist:
- Confirm where TLS terminates
- Verify forwarded protocol headers are trusted and interpreted correctly
- Avoid writing conflicting force HTTPS rules at both edge and origin unless they are intentionally coordinated
- Check for loops caused by the origin redirecting requests that the edge already considers HTTPS
- Test cached redirects to make sure stale rules are not masking current behaviour
Many redirect loops are not logic errors in isolation; they are trust-boundary errors between layers.
4. WordPress or CMS-driven setup
With CMS platforms, there is often a temptation to solve everything in a plugin. That can work for page-level URL changes, but sitewide protocol redirects are usually safer at the web server, hosting platform, or CDN layer. Checklist:
- Set the site URL and home URL to the canonical HTTPS version
- Use one primary redirect layer for protocol enforcement
- Avoid stacking a plugin redirect, a server redirect, and a CDN redirect that all target the same change
- Check generated media URLs and theme assets
- Review any hard-coded absolute URLs in templates, menus, and custom fields
For larger estates, central governance matters more than plugin convenience. Related reading: Redirect Governance for Fast-Changing Content: Lessons from High-Velocity Data Systems.
5. Domain forwarding or host consolidation
If you are combining an HTTP to HTTPS redirect with domain forwarding or hostname consolidation, define the end state first. Example: all traffic from http://oldexample.co.uk, https://oldexample.co.uk, http://www.example.co.uk, and https://www.example.co.uk should go directly to https://example.co.uk. Checklist:
- Create a redirect mapping for all known hostnames and key legacy paths
- Keep the old certificate active long enough to serve HTTPS requests on legacy hosts if they still receive traffic
- Test whether the forwarding layer supports path preservation
- Avoid registrar-level forwarding if it strips paths, drops query strings, or hides the status code behaviour you need
When host changes are involved, the line between a simple HTTPS redirect and a broader migration can disappear quickly. For migration planning, see A Market-Research Approach to Redirect Planning for Site Migrations.
6. Temporary exception or rollback scenario
Occasionally, teams need a temporary change while troubleshooting certificates, upstream integrations, or application bugs. If you must avoid a permanent rule for a short period:
- Document why the exception exists
- Use the correct temporary status code only if the change is truly short-lived
- Set a review date
- Remove the exception once the permanent HTTPS path is ready
Temporary logic tends to become permanent debt if nobody owns the cleanup.
What to double-check
Once the redirect rule exists, the real work is verification. Use this list as your pre-launch and post-launch test routine.
Check 1: One-hop behaviour
Test these variants for representative URLs:
- HTTP non-
www - HTTP
www - HTTPS non-canonical host
- HTTPS canonical host
- URLs with query strings
- URLs with trailing slash and without
- Common uppercase or encoded path patterns if your platform is case-sensitive
Ideal result: each non-canonical variant resolves in one redirect to the final canonical HTTPS URL.
Check 2: Status codes are intentional
For sitewide permanent protocol migration, a 301 redirect is usually the expected choice. If you see 302s, 307s, or mixed behaviour, confirm that it is deliberate and not a platform default. Inconsistent redirect status codes make later auditing harder.
Check 3: Query strings are preserved
Campaign, attribution, and application flows often depend on query parameters. Test URLs with UTM tags and other expected parameters. If your HTTPS redirect drops them, your analytics and user journeys may break. This matters for both SEO-safe forwarding and UTM link tracking.
Check 4: Canonical signals align with redirects
A page that redirects to HTTPS should not still declare an HTTP canonical URL. Review:
- Canonical tags
- Open Graph and social share URLs where relevant
- XML sitemaps
- Hreflang references
- Structured data URLs
- Internal links in templates and navigation
If you are weighing canonical vs redirect in edge cases, keep the primary signal simple: if the public page should not remain available on HTTP, redirect it.
Check 5: Mixed content and external dependencies
Even if page HTML redirects correctly, embedded resources may still load over HTTP. Check:
- Images and CSS
- JavaScript bundles
- Font files
- Analytics scripts
- Payment, login, and identity provider callbacks
- API endpoints called from the browser
Mixed content warnings can make a technically redirected page feel half-migrated.
Check 6: Cookies, sessions, and secure flags
Authentication and basket flows can behave differently once HTTPS is enforced. Confirm:
- Secure cookie settings
- Session persistence through redirects
- Cross-subdomain authentication if used
- Return URLs after login or checkout
This is especially important for admin portals and multi-subdomain estates.
Check 7: Monitoring and logs
After launch, review server logs, CDN analytics, and crawl diagnostics for:
- Unexpected 404s from legacy HTTP paths
- Redirect loops
- Long redirect chains
- Traffic hitting unknown hostnames
- Bots spending time on outdated URL variants
If your environment changes frequently, a verification-first process helps. See A Verification-First Framework for Redirect Audits in Regulated and High-Trust Environments.
Common mistakes
Most HTTPS redirect problems are not caused by the idea itself but by rule overlap, incomplete scope, or poor testing. These are the mistakes worth watching for.
Using multiple redirect layers without a clear owner
A Cloudflare redirect, an Apache redirect, an Nginx redirect, and an application-level redirect can all coexist. That does not mean they should. Pick the controlling layer and document it. If you use edge rules for speed and simplicity, make sure the origin does not try to re-enforce the same logic in a conflicting way.
Creating a redirect chain instead of a direct route
A common pattern is:
http://www.example.co.uk→https://www.example.co.ukhttps://www.example.co.uk→https://example.co.uk
Users may not notice, but crawlers and auditors will. Collapse it into one redirect where possible.
Forgetting non-page URLs
Files, feeds, PDFs, campaign landing URLs, and old subdomains are often missed. A sitewide rule may catch some of them, but not always if different systems serve them.
Assuming DNS alone handles HTTPS migration
DNS can point traffic to a new place, but it does not replace HTTP status code control. A proper website redirect still needs to be handled by a layer that speaks HTTP and returns the redirect response.
Relying on meta refresh or JavaScript for protocol changes
Client-side methods are weaker than a server-side redirect for this use case. Use server or edge logic unless you are dealing with a niche fallback scenario.
Dropping query strings during forwarding
This can quietly damage analytics and campaign routing. If marketing or operations teams use tracked links, query preservation should be an explicit acceptance criterion.
Leaving old internal links untouched
Even if redirects rescue users, internal HTTP links create unnecessary hops and can complicate auditing. Update templates, content components, navigation, and system-generated links.
Ignoring redirect loops after a certificate or platform change
Loops often appear after changes in proxy configuration, TLS termination, or host trust settings. If a previously working redirect suddenly fails, inspect headers and edge-origin assumptions before rewriting everything.
For environments with changing infrastructure and operational constraints, it can help to think beyond single rules and toward resilient systems. See From Smart Infrastructure to Smart Redirect Infrastructure: What Green Tech Teaches Web Ops.
When to revisit
The best HTTPS redirect setup is not a one-time task. It should be rechecked whenever the inputs change. Use this as a practical review schedule.
- Before migrations: new CMS, new host, reverse proxy introduction, CDN onboarding, or domain consolidation
- Before seasonal planning cycles: especially if traffic peaks make failures more costly
- When workflows or tools change: deployment process, infrastructure as code, edge rule management, plugin stack, or load balancer policies
- After certificate renewals or TLS changes: particularly if the renewal involved host coverage changes or automation updates
- After major template or application releases: to catch mixed content and hard-coded HTTP links
- During redirect audits: when cleaning up legacy rules, mergers, or accumulated redirect mapping debt
A practical routine is to maintain a small regression test set of critical URLs and run it every time you change infrastructure. Include homepage variants, high-value landing pages, tracked URLs, login paths, feed endpoints, and one or two legacy URLs that still attract traffic.
To make this article useful as a repeat checklist, end each review with five actions:
- List your canonical HTTPS hostname and any allowed public variants.
- Test representative HTTP and host combinations for one-hop behaviour.
- Confirm 301 status, path preservation, and query-string preservation.
- Review canonical signals, internal links, and mixed content.
- Log any exception, assign an owner, and set a recheck date.
If your site changes often, that discipline matters more than any single redirect rule. The safest HTTPS redirect setup is the one that remains understandable six months later, after a platform update, team change, or infrastructure move.