Skip to content

Redirect admin area requests to HTTPS

Create a redirect rule to redirect requests for the administration area of store.example.com to HTTPS, keeping the original path and query string.

This example single redirect for zone example.com will redirect requests for the administration area of a specific subdomain (store.example.com) to HTTPS, keeping the original path and query string.

When incoming requests match

  • Wildcard pattern
    • Request URL: http://store.example.com/admin*

Then

  • Target URL: https://store.example.com/${1}
  • Status code: 301
  • Preserve query string: Enabled

For example, the redirect rule would perform the following redirects:

Request URLTarget URLStatus code
http://store.example.com/admin/products/https://store.example.com/admin/products/301
https://store.example.com/admin/products/(unchanged)n/a
http://store.example.com/admin/?logged_out=truehttps://store.example.com/admin/?logged_out=true301
http://store.example.com/?all_items=true(unchanged)n/a
http://example.com/admin/(unchanged)n/a